Skip to content

Commit 5712350

Browse files
committed
perf: minor test imrovement + force npm deploy
1 parent 2470daa commit 5712350

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/bus.js

+12
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,18 @@ describe('Bus', () => {
7979

8080
expect(signals.length).to.equal(0)
8181
})
82+
83+
it('`listen` returns empty if signal expired', done => {
84+
const name = 'foo-expiring'
85+
bus.emit(name, { bar: 'baz' }, 5)
86+
87+
expect(bus.listen(name).length).to.equal(1)
88+
89+
setTimeout(() => {
90+
expect(bus.listen(name).length).to.equal(0)
91+
done()
92+
}, 10)
93+
})
8294
})
8395

8496
describe('`capture`', () => {

0 commit comments

Comments
 (0)