Ran
|
Jobs
1
|
Files
12
|
Run time
2s
|
Badge
README BADGES
|
travis-ci
<a href="https://github.com/mobxjs/mobx-utils/commit/<a class=hub.com/mobxjs/mobx-utils/commit/e0de8ba2c7848aa7db6ce87f995ba85afef364f6">e0de8ba2c<a href="https://github.com/mobxjs/mobx-utils/commit/e0de8ba2c7848aa7db6ce87f995ba85afef364f6">">Fix fromStream to handle already completed streams In the implementation of `StreamListener` for `fromStream`, the `complete()` handler (for a completed observable stream) [calls `this.subscription.unsubscribe()`][unsub]. Unfortunately, `this.subscription` is initialized with the line `this.subscription = observable.subscribe(this)` in the constructor. This requires first evaluating `observable.subscribe(this)`, which calls the `complete()` handler if an already-completed observable was passed to it. As such, for already-completed observables, `fromStream` fails, trying to call `.unsubscribe()` on the `this.subscription` before it is initialized. [unsub]: https://github.com/mobxjs/mobx-utils/blob/</a><a class="double-link" href="https://github.com/mobxjs/mobx-utils/commit/<a class="double-link" href="https://git"><a class=</a>hub.com/mobxjs/mobx-utils/commit/<a class=hub.com/mobxjs/mobx-utils/commit/89f3da595cf1c22697ba701d101e6ad31c001f64">89f3da595">89f3da595</a><a href="https://github.com/mobxjs/mobx-utils/commit/e0de8ba2c7848aa7db6ce87f995ba85afef364f6">/src/observable-stream.ts#L87 [sub]: https://github.com/mobxjs/mobx-utils/blob/89f3da595cf1c22697ba701d101e6ad31c001f64/src/observable-stream.ts#L74</a>
103 of 140 branches covered (73.57%)
287 of 308 relevant lines covered (93.18%)
3.46 hits per line
Lines | Coverage | ∆ | File |
---|---|---|---|
2 |
87.23 |
2.13% | lib/observable-stream.js |
ID | Job ID | Ran | Files | Coverage | |
---|---|---|---|---|---|
1 | 88.1 | 12 |
93.18 |
Travis Job 88.1 |
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line | Branch Hits | Branch Misses |
---|