Unregister the end streams after their dependents have run fix #1736

This commit is contained in:
Pierre-Yves Gerardy 2017-03-24 14:43:48 +01:00
parent 3578d0ffb3
commit f22f884b1e
3 changed files with 18 additions and 10 deletions

View file

@ -264,14 +264,17 @@ o.spec("stream", function() {
o(doubled()).equals(4)
})
o("end stream can be mapped to", function() {
var stream = Stream()
var spy = o.spy()
var stream = Stream()
var spy = o.spy()
stream.end.map(spy)
stream.end(true)
stream.end.map(spy)
o(spy.callCount).equals(1)
})
o(spy.callCount).equals(0)
stream.end(true)
o(spy.callCount).equals(1)
})
})
o.spec("valueOf", function() {
o("works", function() {