import { async , ComponentFixture , TestBed } from '@angular/core/testing' ; import { ContentComponent } from './content.component' ; describe ( 'ContentComponent' , ( ) => { let component ; let fixture ; beforeEach ( async ( ( ) => { TestBed . configureTestingModule ( { declarations : [ ContentComponent ] } ) . compileComponents ( ) ; } ) ) ; beforeEach ( ( ) => { fixture = TestBed . createComponent ( ContentComponent ) ; component = fixture . componentInstance ; fixture . detectChanges ( ) ; } ) ; it ( 'should create' , ( ) => { expect ( component ) . toBeTruthy ( ) ; } ) ; it ( 'should render title' , ( ) => { fixture . detectChanges ( ) ; const compiled = fixture . debugElement . nativeElement ; expect ( compiled . querySelector ( 'div div div div h1' ) . textContent ) . toContain ( 'Starter Page' ) ; } ) ; } ) ;