Skip to content

9.6.1 breaks tests with ngrx #142

Closed
@vokeit-gschuster

Description

We 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().

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions