9.6.1 breaks tests with ngrx
See original GitHub issueWe upgraded ng-mocks to 9.6.1 today and several (about 10 of ~700) tests break because of ngrx missing injection tokens:
NullInjectorError: R3InjectorError(DynamicTestModule)[StoreFeatureModule -> InjectionToken @ngrx/store Internal Store Features -> InjectionToken @ngrx/store Internal Store Features]:
NullInjectorError: No provider for InjectionToken @ngrx/store Internal Store Features!
error properties: Object({ originalStack: 'Error: NullInjectorError: No provider for InjectionToken @ngrx/store Internal Store Features!
These now failing tests work absolutely fine with 9.5.0, @ngrx/effects 9.2.0 and @ngrx/store 9.2.0. I see that the Module mock has been totally refactored and as far as I can tell it now seems to sometimes miss the given imports of StoreModule.forRoot(), StoreModule.forFeature(), EffectsModule.forRoot() and EffectsModule.forFeature().
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
9.6.1 breaks tests with ngrx · Issue #142 - GitHub
We upgraded ng-mocks to 9.6.1 today and several (about 10 of ~700) tests break because of ngrx missing injection tokens: NullInjectorError: ...
Read more >Unit Testing NgRx Effects. Without Marbles | by Josh Hicks
I want to know that it: works as expected; doesn't break anything else; breaks if I make changes that should break it. These...
Read more >The Complete Guide to NgRx Testing (2020)
This post will show you how to test NgRx apps, what to test for and how to create the tests with ease. Testing...
Read more >Testing Angular with Cypress and Docker | TestDriven.io
This post details how to add end-to-end tests to an Angular app with Cypress and Docker.
Read more >angular/fire - npm
NgRx friendly API - Integrate with NgRx using AngularFire's action based APIs. Lazy-loading - AngularFire dynamically imports much of Firebase, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Test for MyComponent (in MyModule) fails with mocked “MyOtherModule” that has ngrx integrated.
Hi there, 9.6.2 has been released. Please let me know how it works for you.