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:
David Dias
2018-06-28 10:06:25 +02:00
committed by GitHub
parent b80e89269c
commit 6905f1ba41
56 changed files with 1401 additions and 789 deletions

View File

@ -8,8 +8,8 @@ chai.use(require('dirty-chai'))
const expect = chai.expect
const parallel = require('async/parallel')
const _times = require('lodash.times')
const utils = require('./utils/node')
const createNode = utils.createNode
const createNode = require('./utils/create-node')
describe('.peerRouting', () => {
let nodeA
@ -23,8 +23,11 @@ describe('.peerRouting', () => {
const tasks = _times(5, () => (cb) => {
createNode('/ip4/0.0.0.0/tcp/0', {
mdns: false,
dht: true
config: {
EXPERIMENTAL: {
dht: true
}
}
}, (err, node) => {
expect(err).to.not.exist()
node.start((err) => cb(err, node))