mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-06-13 01:01:23 +00:00
feat: (BREAKING CHANGE) overhaul libp2p config and constructor
* docs: update chat example and add info to its readme * docs: update echo example * docs: update libp2p in browser example * docs: update pubsub example * docs: update peer and content routing examples * docs: update discovery mechanisms example * docs: update encrypted comms example * docs: update protocol and stream muxing example * feat: add config validation * test: update CI configs, use only node 8
This commit is contained in:
@ -6,9 +6,9 @@ chai.use(require('dirty-chai'))
|
||||
const expect = chai.expect
|
||||
const signalling = require('libp2p-webrtc-star/src/sig-server')
|
||||
const parallel = require('async/parallel')
|
||||
const utils = require('./utils/node')
|
||||
const createNode = utils.createNode
|
||||
const echo = utils.echo
|
||||
|
||||
const createNode = require('./utils/create-node')
|
||||
const echo = require('./utils/echo')
|
||||
|
||||
describe('peer discovery', () => {
|
||||
let nodeA
|
||||
@ -52,13 +52,21 @@ describe('peer discovery', () => {
|
||||
parallel([
|
||||
(cb) => nodeA.stop(cb),
|
||||
(cb) => nodeB.stop(cb),
|
||||
(cb) => ss.stop(done)
|
||||
(cb) => ss.stop(cb)
|
||||
], done)
|
||||
})
|
||||
}
|
||||
|
||||
describe('MulticastDNS', () => {
|
||||
setup({ mdns: true })
|
||||
setup({
|
||||
config: {
|
||||
peerDiscovery: {
|
||||
mdns: {
|
||||
enabled: true
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
it('find a peer', function (done) {
|
||||
this.timeout(15 * 1000)
|
||||
@ -87,8 +95,16 @@ describe('peer discovery', () => {
|
||||
|
||||
describe('MulticastDNS + WebRTCStar', () => {
|
||||
setup({
|
||||
webRTCStar: true,
|
||||
mdns: true
|
||||
config: {
|
||||
peerDiscovery: {
|
||||
mdns: {
|
||||
enabled: true
|
||||
},
|
||||
webRTCStar: {
|
||||
enabled: true
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
it('find a peer', function (done) {
|
||||
|
Reference in New Issue
Block a user