spy.show() doesn't filter out observables that run in sync
See original GitHub issueWhen using spy.show() from the console, observables that run synchronously are not filtered out of the list.
const asyncSub = new AsyncSubject();
asyncSub.next(null);
asyncSub.complete();
asyncSub.pipe(tag('nodelay.1')).subscribe();
asyncSub.pipe(tag('nodelay.2')).subscribe();
asyncSub
.pipe(
tag('delay.1'),
delay(1),
)
.subscribe();
asyncSub
.pipe(
tag('delay.2'),
delay(1),
)
.subscribe();
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
hirezio/observer-spy: This library makes RxJS ... - GitHub
This library makes RxJS Observables testing easy! Contribute to hirezio/observer-spy development by creating an account on GitHub. ... Testing Sync Logic.
Read more >Filter Observable by Observable - javascript - Stack Overflow
I want to make sure that Observable.subscribe() doesn't get executed if a different Observable yields true . An example use case would be...
Read more >hirez_io/observer-spy - npm.io
RxJS - without delaying operators or async execution contexts - will run synchronously. This is the simplest use case; where our it() does...
Read more >How I Write Marble Tests For RxJS Observables In Angular
This issue is solved by the new run method. Every RxJS operator who uses the AsyncScheduler (for example "timer" or "debounce") will automatically...
Read more >Observable | RxJS API Document - ReactiveX
Filter items emitted by the source Observable by only emitting those that satisfy a ... This will be repeated, until the operator runs...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I added some sync tests for the graph flushing to
rxjs-devtools
and they passed. I’ve added the same tests here and they too pass. I’m not going to look further into this because although the graphing implementation is pretty much unchanged, the snapshotting implementation inrxjs-devtools
is completely different.Why is that a problem? It states that they are complete. There will be more advanced querying capabilities in
rxjs-devtools
, but this is not something that I intend to fix/change here.Completed subscriptions will continue to be shown until the
keptDuration
elapses.