added test for stream.end.map
Tests for issue #1736 Any maps set to the end stream do not get called. In fact, for some reason adding a map to and end stream throws an error: ``` Cannot read property '_state' of undefined at updateDependency (/Users/eladzlot/www/mithril.js/stream/stream.js:46:20) ```
This commit is contained in:
parent
fda816edba
commit
3578d0ffb3
1 changed files with 9 additions and 0 deletions
|
|
@ -263,6 +263,15 @@ o.spec("stream", function() {
|
||||||
|
|
||||||
o(doubled()).equals(4)
|
o(doubled()).equals(4)
|
||||||
})
|
})
|
||||||
|
o("end stream can be mapped to", function() {
|
||||||
|
var stream = Stream()
|
||||||
|
var spy = o.spy()
|
||||||
|
|
||||||
|
stream.end.map(spy)
|
||||||
|
stream.end(true)
|
||||||
|
|
||||||
|
o(spy.callCount).equals(1)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
o.spec("valueOf", function() {
|
o.spec("valueOf", function() {
|
||||||
o("works", function() {
|
o("works", function() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue