Skip to content

Commit

Permalink
test: add test for verifying disabled modules
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobheun committed Jul 20, 2018
1 parent bca997d commit 811e4e5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
"pull-serializer": "~0.3.2",
"pull-stream": "^3.6.8",
"sinon": "^6.1.3",
"webrtcsupport": "^2.2.0",
"wrtc": "~0.1.6"
},
"contributors": [
Expand Down
16 changes: 16 additions & 0 deletions test/create.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,20 @@ describe('libp2p creation', () => {
})
})
})

it('should not create disabled modules', (done) => {
createNode([], {
config: {
EXPERIMENTAL: {
dht: false,
pubsub: false
}
}
}, (err, node) => {
expect(err).to.not.exist()
expect(node._dht).to.not.exist()
expect(node._floodSub).to.not.exist()
done()
})
})
})

0 comments on commit 811e4e5

Please sign in to comment.