import { TestBed , waitForAsync } from '@angular/core/testing' ; import { RouterTestingModule } from '@angular/router/testing' ; import { AppComponent } from './app.component' ; describe ( 'AppComponent' , ( ) => { beforeEach ( ( ) => { TestBed . configureTestingModule ( { declarations : [ AppComponent ] , imports : [ RouterTestingModule ] } ) ; } ) ; it ( 'should create the app' , waitForAsync ( ( ) => { const fixture = TestBed . createComponent ( AppComponent ) ; const app = fixture . debugElement . componentInstance ; expect ( app ) . toBeTruthy ( ) ; } ) ) ; it ( `should have angular logo on navbar` , waitForAsync ( ( ) => { const fixture = TestBed . createComponent ( AppComponent ) ; const compiled = fixture . debugElement . nativeElement ; expect ( compiled . querySelector ( 'img[src="assets/angular.png"]' ) ) . toBeTruthy ( ) ; } ) ) ; it ( `should have datatables logo on navbar` , waitForAsync ( ( ) => { const fixture = TestBed . createComponent ( AppComponent ) ; const compiled = fixture . debugElement . nativeElement ; expect ( compiled . querySelector ( 'img[src="assets/datatables.png"]' ) ) . toBeTruthy ( ) ; } ) ) ; } ) ;