here is my test :
describe('ValueService', () => {
it('#getValue should return real value', () => {
expect(true).toBeTruthy();
});
});
And I have this error :
Failed: Cannot configure the test module when the test module has already been instantiated. Make sure you are not using
injectbeforeR3TestBed.configureTestingModule. Error: Cannot configure the test module when the test module has already been instantiated. Make sure you are not usinginjectbeforeR3TestBed.configureTestingModule.
Please note that you may experience this error if the following conditions are true, even if you properly have your TestBed.configureTestingModule inside a describe:
provideMockStore in your test.This issue is discussed here.
The fix is to add teardown: { destroyAfterEach: false } to your module configuration.
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