import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core' ; import { ComponentFixture , TestBed , waitForAsync } from '@angular/core/testing' ; import { RouterTestingModule } from '@angular/router/testing' ; import { UiService } from '../../core/ui' ; import { ControlsComponent } from './controls.component' ; let comp ; let fixture ; const uiServiceStub = undefined ; describe ( 'HistoryControlsComponent' , ( ) => { beforeEach ( waitForAsync ( ( ) => { TestBed . configureTestingModule ( { declarations : [ ControlsComponent ] , imports : [ RouterTestingModule ] , schemas : [ CUSTOM_ELEMENTS_SCHEMA ] , providers : [ { provide : UiService , useValue : uiServiceStub } ] , } ) . compileComponents ( ) . then ( ( ) => { fixture = TestBed . createComponent ( ControlsComponent ) ; comp = fixture . componentInstance ; } ) ; } ) ) ; it ( 'Should create the component' , ( ) => { expect ( comp ) . toBeTruthy ( ) ; } ) ; } ) ;