import { TestBed , waitForAsync } from '@angular/core/testing' ; import { AppComponent } from './app.component' ; import { RouterTestingModule } from '@angular/router/testing' ; import { NO_ERRORS_SCHEMA } from '@angular/core' ; describe ( 'AppComponent (initial CLI version)' , ( ) => { beforeEach ( waitForAsync ( ( ) => { TestBed . configureTestingModule ( { declarations : [ AppComponent , ] , imports : [ RouterTestingModule ] , schemas : [ NO_ERRORS_SCHEMA ] } ) . compileComponents ( ) ; } ) ) ; it ( 'should create the app' , waitForAsync ( ( ) => { const fixture = TestBed . createComponent ( AppComponent ) ; const app = fixture . componentInstance ; expect ( app ) . toBeTruthy ( ) ; } ) ) ; } ) ;