import { waitForAsync , ComponentFixture , TestBed } from '@angular/core/testing' ; import { LandingComponent } from './landing.component' ; import { RouterTestingModule } from '@angular/router/testing' ; import { HttpClientTestingModule } from '@angular/common/http/testing' ; import { HomeModule } from '@ngx-starter-kit/home' ; import { SvgViewerModule } from '@ngx-starter-kit/svg-viewer' ; describe ( 'LandingComponent' , ( ) => { let component ; let fixture ; beforeEach ( waitForAsync ( ( ) => { TestBed . configureTestingModule ( { imports : [ SvgViewerModule , RouterTestingModule , HttpClientTestingModule ] , declarations : [ LandingComponent ] , } ) . compileComponents ( ) ; } ) ) ; beforeEach ( ( ) => { fixture = TestBed . createComponent ( LandingComponent ) ; component = fixture . componentInstance ; fixture . detectChanges ( ) ; } ) ; it ( 'should create' , ( ) => { expect ( component ) . toBeTruthy ( ) ; } ) ; it ( 'should render title in a h1 tag' , async ( ( ) => { fixture = TestBed . createComponent ( LandingComponent ) ; fixture . detectChanges ( ) ; const compiled = fixture . debugElement . nativeElement ; expect ( compiled . querySelector ( 'h1' ) . textContent ) . toContain ( 'Sumo App' ) ; } ) ) ; } ) ;