I am using Karma to run test on my Angular 4 app. It works locally but when it runs on my host environment (Travis CI) it fails with the following informati
There is another way you can have this error too :
For me it was that I forgot to make the call to
beforeEach(() => {
TestBed.configureTestingModule({
});
});
My guess is that if this is not called it gets the NgModule from the AppModule and thus trying to import all the modules in there which cause this problem