mirror of
https://github.com/fluencelabs/js-libp2p-interfaces
synced 2025-04-24 16:32:32 +00:00
chore: update pubsub tests
This commit is contained in:
parent
0cb709635f
commit
0b4fd039f8
@ -62,7 +62,9 @@ module.exports = (common) => {
|
||||
expect(psB.peers.size).to.equal(1)
|
||||
expectSet(psB.topics.get(topic), [psA.peerId.toB58String()])
|
||||
expect(changedPeerId.toB58String()).to.equal(first(psB.peers).id.toB58String())
|
||||
expect(changedSubs).to.be.eql([{ topicID: topic, subscribe: true }])
|
||||
expect(changedSubs).to.have.lengthOf(1)
|
||||
expect(changedSubs[0].topicID).to.equal(topic)
|
||||
expect(changedSubs[0].subscribe).to.equal(true)
|
||||
defer.resolve()
|
||||
})
|
||||
psA.subscribe(topic)
|
||||
@ -144,7 +146,9 @@ module.exports = (common) => {
|
||||
expect(psB.peers.size).to.equal(1)
|
||||
expectSet(psB.topics.get(topic), [])
|
||||
expect(changedPeerId.toB58String()).to.equal(first(psB.peers).id.toB58String())
|
||||
expect(changedSubs).to.be.eql([{ topicID: topic, subscribe: false }])
|
||||
expect(changedSubs).to.have.lengthOf(1)
|
||||
expect(changedSubs[0].topicID).to.equal(topic)
|
||||
expect(changedSubs[0].subscribe).to.equal(false)
|
||||
|
||||
defer.resolve()
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user