import { async , ComponentFixture , TestBed } from '@angular/core/testing' ; import { MatIconModule } from '@angular/material/icon' ; import { MatInputModule } from '@angular/material/input' ; import { NgbModal } from '@ng-bootstrap/ng-bootstrap' ; import { TranslateModule } from '@ngx-translate/core' ; import { MockComponent } from 'ng-mocks' ; import { IconComponent } from '@medium-stories/shared' ; import { SearchComponent } from './search.component' ; describe ( 'SearchComponent' , ( ) => { let component ; let fixture ; beforeEach ( async ( ( ) => { return TestBed . configureTestingModule ( { imports : [ MatInputModule , MatIconModule , TranslateModule . forRoot ( ) ] , declarations : [ SearchComponent , MockComponent ( IconComponent ) ] , providers : [ { provide : NgbModal , useValue : { open : jest . fn ( ) } } ] } ) . compileComponents ( ) ; } ) ) ; beforeEach ( ( ) => { fixture = TestBed . createComponent ( SearchComponent ) ; component = fixture . componentInstance ; fixture . detectChanges ( ) ; } ) ; it ( 'should create' , ( ) => { expect ( component ) . toBeTruthy ( ) ; } ) ; } ) ;