I have this module:
import { EffectsModule } from '@ngrx/effects';
@NgModule({
declarations: [MyComponent],
imports: [
EffectsModule.forFeature([MyEffect]),
],
})
export class MyModule { }
and I want inport it into TestBed
import { MyModule} from './my.module';
describe('MyTest', () => {
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
MyModule
]
});
});
});
but it raise an exception:
NullInjectorError: R3InjectorError(DynamicTestModule)[EffectsFeatureModule -> EffectsRootModule -> EffectsRootModule]: NullInjectorError: No provider for EffectsRootModule!
Try to add to your imports:
imports: [
EffectsModule.forRoot([])
]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With