import { TestBed , async } from '@angular/core/testing' ; import { FlipModule } from 'ngx-flip' ; import { AppComponent } from './app.component' ; describe ( 'AppComponent' , ( ) => { beforeEach ( async ( ( ) => { TestBed . configureTestingModule ( { declarations : [ AppComponent ] , imports : [ FlipModule ] , } ) . compileComponents ( ) ; } ) ) ; it ( 'should create the app' , async ( ( ) => { const fixture = TestBed . createComponent ( AppComponent ) ; const app = fixture . debugElement . componentInstance ; expect ( app ) . toBeTruthy ( ) ; } ) ) ; it ( 'should render ngx-flip element ' , async ( ( ) => { const fixture = TestBed . createComponent ( AppComponent ) ; fixture . detectChanges ( ) ; const compiled = fixture . debugElement . nativeElement ; expect ( compiled . querySelector ( 'ngx-flip' ) ) . toBeTruthy ( ) ; } ) ) ; it ( 'should have button containing flip text ' , async ( ( ) => { const fixture = TestBed . createComponent ( AppComponent ) ; fixture . detectChanges ( ) ; const compiled = fixture . debugElement . nativeElement ; expect ( compiled . querySelector ( 'button' ) . textContent . toLowerCase ( ) ) . toContain ( 'flip' ) ; } ) ) ; } ) ;