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
Replacing asyncScheduler with asapSchedulerhere (scheduling lifecycle hooks check to the microtask queue instead of macrotask) should solve this issue. Do you want to open the PR?
Which @ngrx/* package(s) are the source of the bug?
component-store
Minimal reproduction of the bug/regression with instructions
Running this unit test produces
Minimal reproduction of the bug/regression with instructions
The test above should pass.
Versions of NgRx, Angular, Node, affected browser(s) and operating system(s)
NgRx: 14.0.2
Angular: 14.2
Other information
I believe it's a regression introduced with the lifecycle hooks. In particular, the run-time check in this PR: https://github.com/ngrx/platform/pull/3432/files#diff-dd156bfdaf294eb2eb0c9c87e1403ddd40190b88afa6ed8b443fb7cb1cd008f6R322
This check uses rxjs
asyncScheduler.schedule()
, which internally usessetInterval
- a periodic task that offendsfakeAsync
:)https://github.com/ReactiveX/rxjs/blob/6.x/src/internal/scheduler/AsyncAction.ts#L50
I would be willing to submit a PR to fix this issue
The text was updated successfully, but these errors were encountered: