fix: update pubsub interfaces (#1194)

Update to latest version of pubsub interface
This commit is contained in:
Alex Potsides
2022-04-22 20:49:35 +01:00
committed by GitHub
parent 5397137c65
commit fab4f1385c
10 changed files with 32 additions and 50 deletions

View File

@ -90,12 +90,12 @@ describe('Pubsub subscription handlers adapter', () => {
pubsub.subscribe(topic)
pubsub.addEventListener('message', handler)
pubsub.publish(topic, uint8ArrayFromString('useless-data'))
await pubsub.publish(topic, uint8ArrayFromString('useless-data'))
await defer.promise
pubsub.unsubscribe(topic)
pubsub.removeEventListener('message', handler)
pubsub.publish(topic, uint8ArrayFromString('useless-data'))
await pubsub.publish(topic, uint8ArrayFromString('useless-data'))
// wait to guarantee that the handler is not called twice
await delay(100)