I don’t see how the previous solution works, because it Configis required App, it is required Platform, it is required Keyboard, it needs ... perhaps it is because you are not configuring the test module asynchronously, which you should;) just try the following:
import { IonicModule } from 'ionic-angular';
import { YourTestedComponent } from './pathto.component.ts'
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [ IonicModule.forRoot(this) ], // this loads ionic deps
declarations: [ YourTestedComponent ],
});
}));
That should fix it. Good luck.
source
share