question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

spy.show() doesn't filter out observables that run in sync

See original GitHub issue

When 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();

spybug

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
cartantcommented, Feb 21, 2019

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 in rxjs-devtools is completely different.

1reaction
cartantcommented, Feb 21, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found