You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today I learned about this new helper function toSatisfyOnFlush which removes the need to run tests in a testScheduler.run() callback, manually flushing an observable after subscribing.
While replacing those testScheduler.run() tests with expect(stream).toSatisfyOnFlush(() => {}), I came across a use case where the use of the delay() operator does not seem to get flushed with that helper function.
Stream:
// NgRx Effect:readonlypongReceived$=createEffect(()=>this.actions$.pipe(ofType(actions.pongReceived),delay(60000),// one minutetap(()=>this.someService.sendPing()),),{dispatch: false},);
With TestScheduler.run, this works and the spied method has been called
Is there a particular reason, time related operators aren't flushed? Based on the name of the helper function, I would have assumed it would. Is it related to the time progression syntax not being supported (#117)
The text was updated successfully, but these errors were encountered:
Hi,
Today I learned about this new helper function
toSatisfyOnFlush
which removes the need to run tests in a testScheduler.run() callback, manually flushing an observable after subscribing.While replacing those testScheduler.run() tests with
expect(stream).toSatisfyOnFlush(() => {})
, I came across a use case where the use of thedelay()
operator does not seem to get flushed with that helper function.Stream:
With TestScheduler.run, this works and the spied method has been called
With
toSatisfyOnFlush
this does not seem to work:Is there a particular reason, time related operators aren't flushed? Based on the name of the helper function, I would have assumed it would. Is it related to the time progression syntax not being supported (#117)
The text was updated successfully, but these errors were encountered: