mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-03-17 16:10:52 +00:00
25 lines
520 B
JavaScript
25 lines
520 B
JavaScript
/* eslint-env mocha */
|
|
'use strict'
|
|
|
|
const chai = require('chai')
|
|
chai.use(require('dirty-chai'))
|
|
const expect = chai.expect
|
|
|
|
const createNode = require('./utils/node').createNode
|
|
|
|
describe('libp2p', (done) => {
|
|
it('has stats', () => {
|
|
createNode('/ip4/127.0.0.1/tcp/0', {
|
|
mdns: false,
|
|
dht: true
|
|
}, (err, node) => {
|
|
expect(err).to.not.exist()
|
|
node.start((err) => {
|
|
expect(err).to.not.exist()
|
|
expect(node.stats).to.exist()
|
|
node.stop(done)
|
|
})
|
|
})
|
|
})
|
|
})
|