import { async , ComponentFixture , TestBed } from '@angular/core/testing' ; import { By } from '@angular/platform-browser' ; import { AboutComponent } from './about.component' ; describe ( 'Component: About' , ( ) => { let component ; let fixture ; beforeEach ( async ( ( ) => { TestBed . configureTestingModule ( { declarations : [ AboutComponent ] , } ) . compileComponents ( ) ; } ) ) ; beforeEach ( ( ) => { fixture = TestBed . createComponent ( AboutComponent ) ; component = fixture . componentInstance ; fixture . detectChanges ( ) ; } ) ; it ( 'should create' , ( ) => { expect ( component ) . toBeTruthy ( ) ; } ) ; it ( 'should display the string "About" in h5' , ( ) => { const el = fixture . debugElement . query ( By . css ( 'h5' ) ) . nativeElement ; expect ( el . textContent ) . toContain ( 'About' ) ; } ) ; } ) ;