mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-06-18 11:41:21 +00:00
feat: integrate gossipsub by default (#365)
BREAKING CHANGE: new configuration for deciding the implementation of pubsub to be used. In this context, the experimental flags were also removed. See the README for the latest usage.
This commit is contained in:
@ -19,8 +19,8 @@ describe('libp2p creation', () => {
|
||||
it('should be able to start and stop successfully', (done) => {
|
||||
createNode([], {
|
||||
config: {
|
||||
EXPERIMENTAL: {
|
||||
pubsub: true
|
||||
pubsub: {
|
||||
enabled: true
|
||||
},
|
||||
dht: {
|
||||
enabled: true
|
||||
@ -32,7 +32,7 @@ describe('libp2p creation', () => {
|
||||
const sw = node._switch
|
||||
const cm = node.connectionManager
|
||||
const dht = node._dht
|
||||
const pub = node._floodSub
|
||||
const pub = node.pubsub
|
||||
|
||||
sinon.spy(sw, 'start')
|
||||
sinon.spy(cm, 'start')
|
||||
@ -77,13 +77,13 @@ describe('libp2p creation', () => {
|
||||
it('should not create disabled modules', (done) => {
|
||||
createNode([], {
|
||||
config: {
|
||||
EXPERIMENTAL: {
|
||||
pubsub: false
|
||||
pubsub: {
|
||||
enabled: false
|
||||
}
|
||||
}
|
||||
}, (err, node) => {
|
||||
expect(err).to.not.exist()
|
||||
expect(node._floodSub).to.not.exist()
|
||||
expect(node._pubsub).to.not.exist()
|
||||
done()
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user