import { async , ComponentFixture , TestBed } from '@angular/core/testing' ; import { FontAwesomeModule } from '@fortawesome/angular-fontawesome' ; import { faSearch } from '@fortawesome/free-solid-svg-icons' ; import { IconComponent } from './icon.component' ; describe ( 'IconComponent' , ( ) => { let component ; let fixture ; beforeEach ( async ( ( ) => { return TestBed . configureTestingModule ( { imports : [ FontAwesomeModule ] , declarations : [ IconComponent ] } ) . compileComponents ( ) ; } ) ) ; beforeEach ( ( ) => { fixture = TestBed . createComponent ( IconComponent ) ; component = fixture . componentInstance ; component . icon = faSearch ; fixture . detectChanges ( ) ; } ) ; it ( 'should create' , ( ) => { expect ( component ) . toBeTruthy ( ) ; } ) ; } ) ;