import { TestBed , waitForAsync } from '@angular/core/testing' ; import { NgBrazil , TextMask } from 'ng-brazil' ; import { AppComponent } from './app.component' ; import { RouterTestingModule } from '@angular/router/testing' ; import { routes } from './app.module' ; import { DemoComponent } from './demo/demo.component' ; import { FormsModule , ReactiveFormsModule } from '@angular/forms' ; describe ( 'AppComponent' , ( ) => { beforeEach ( waitForAsync ( ( ) => { TestBed . configureTestingModule ( { imports : [ FormsModule , ReactiveFormsModule , TextMask . TextMaskModule , NgBrazil . forRoot ( ) , RouterTestingModule . withRoutes ( routes ) ] , declarations : [ AppComponent , DemoComponent ] , } ) . compileComponents ( ) ; } ) ) ; it ( 'should create the app' , waitForAsync ( ( ) => { const fixture = TestBed . createComponent ( AppComponent ) ; const app = fixture . debugElement . componentInstance ; expect ( app . title ) . toEqual ( 'app' ) ; } ) ) ; } ) ;