Closed rbutera closed 3 years ago
Nope. There's no issue with using throttleTime
with fakeSchedulers
: https://github.com/cartant/rxjs-marbles/blob/8ea7b795a945a6c92c9df4ed1aa8876d3eb7f526/fixtures/mocha/issues-spec.ts#L43-L63
Your problem is likely that you have something other than a scheduler or a setInterval
/setTimeout
API call - a Promise
maybe? - that's introducing asynchrony.
Hello,
I am trying to test a NestJS Saga (not wholly relevant -- just a bit of context here) with the following implementation:
As you can see, I am grouping the events by user id and then throttling those individual groups.
The test I have is:
Unfortunately this test fails, as result is empty. If I remove
throttleTime
, then result is no longer empty, and contains 4 items.Is it possible to test an observable that uses
throttleTime
usingfakeScheduler
?