-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
toBeObservable
does not work with with Ngrx mockStore.overrideSelector
#396
Comments
mockStore.overrideSelector
toBeObservable
does not work with with Ngrx mockStore.overrideSelector
I think we ran into the same bug. What I had drilled this down to, was the jest runner being used. At some point, that switched from jest-jasmine2 to jest-circus. If you set But your details here, might help solve the underlying issue. |
We already have this in our jest.preset.js and are experiencing this issue. To add to this, the import order in the test file is significant. This only seems to happen when the Works import { MockStore, provideMockStore } from '@ngrx/store/testing';
import { cold, hot } from 'jest-marbles'; import { MockStore, provideMockStore } from '@ngrx/store/testing';
import { foo } from 'module-importing-jest-marbles'; Fails import { cold, hot } from 'jest-marbles';
import { MockStore, provideMockStore } from '@ngrx/store/testing'; import { foo } from 'module-importing-jest-marbles';
import { MockStore, provideMockStore } from '@ngrx/store/testing'; |
Thank you so much. I was struggling with it for many days during dependencies upgrade. I also tried to use |
While upgrading our repository from Nx 11.x & Angular 11.x to Nx 13.1.4 and Angular to v12.x we noticed all of our
expect(result).toBeObservable(expected)
that usedstore.overrideSelector
started to fail. We narrowed it down tojest-marbles
not properly working anymore.Reproduction and more information can be found in this repository: https://github.com/Itrulia/jest-marbles-ngrx-bug
The text was updated successfully, but these errors were encountered: