2018-02-23 13:19:39 +00:00
|
|
|
/* eslint-env mocha */
|
|
|
|
'use strict'
|
|
|
|
|
|
|
|
const chai = require('chai')
|
|
|
|
chai.use(require('dirty-chai'))
|
|
|
|
const expect = chai.expect
|
|
|
|
|
2018-06-28 10:06:25 +02:00
|
|
|
const createNode = require('./utils/create-node')
|
2018-02-23 13:19:39 +00:00
|
|
|
|
2018-06-28 10:06:25 +02:00
|
|
|
describe('libp2p', () => {
|
|
|
|
it('has stats', (done) => {
|
2018-02-23 14:33:26 +00:00
|
|
|
createNode('/ip4/127.0.0.1/tcp/0', {
|
2018-06-28 10:06:25 +02:00
|
|
|
config: {
|
|
|
|
peerDiscovery: {
|
|
|
|
mdns: {
|
|
|
|
enabled: false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2018-02-23 13:19:39 +00:00
|
|
|
}, (err, node) => {
|
|
|
|
expect(err).to.not.exist()
|
|
|
|
node.start((err) => {
|
|
|
|
expect(err).to.not.exist()
|
|
|
|
expect(node.stats).to.exist()
|
|
|
|
node.stop(done)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|