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:
eladzlot 2017-03-24 11:53:54 +03:00 committed by GitHub
parent fda816edba
commit 3578d0ffb3

View file

@ -263,6 +263,15 @@ o.spec("stream", function() {
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("works", function() {