import { waitForAsync , ComponentFixture , TestBed } from '@angular/core/testing' ; import { NgbModule } from '@ng-bootstrap/ng-bootstrap' ; import { TranslateModule } from '@ngx-translate/core' ; import { RouterTestingModule } from '@angular/router/testing' ; import { AuthenticationService , CredentialsService } from '@app/auth' ; import { MockAuthenticationService } from '@app/auth/authentication.service.mock' ; import { MockCredentialsService } from '@app/auth/credentials.service.mock' ; import { I18nModule } from '@app/i18n' ; import { HeaderComponent } from './header.component' ; describe ( 'HeaderComponent' , ( ) => { let component ; let fixture ; beforeEach ( waitForAsync ( ( ) => { TestBed . configureTestingModule ( { imports : [ RouterTestingModule , NgbModule , TranslateModule . forRoot ( ) , I18nModule ] , declarations : [ HeaderComponent ] , providers : [ { provide : AuthenticationService , useClass : MockAuthenticationService } , { provide : CredentialsService , useClass : MockCredentialsService } ] } ) . compileComponents ( ) ; } ) ) ; beforeEach ( ( ) => { fixture = TestBed . createComponent ( HeaderComponent ) ; component = fixture . componentInstance ; fixture . detectChanges ( ) ; } ) ; it ( 'should create' , ( ) => { expect ( component ) . toBeTruthy ( ) ; } ) ; } ) ;