import { HttpClientTestingModule } from '@angular/common/http/testing' ; import { ComponentFixture , TestBed , waitForAsync } from '@angular/core/testing' ; import { FormBuilder } from '@angular/forms' ; import { RouterTestingModule } from '@angular/router/testing' ; import { AlertService } from 'carey-alert' ; import { LoginComponent } from './login.component' ; describe ( 'LoginComponent' , ( ) => { let component ; let fixture ; beforeEach ( waitForAsync ( ( ) => { TestBed . configureTestingModule ( { declarations : [ LoginComponent ] , imports : [ HttpClientTestingModule , RouterTestingModule ] , providers : [ FormBuilder , AlertService ] } ) . compileComponents ( ) ; } ) ) ; beforeEach ( ( ) => { fixture = TestBed . createComponent ( LoginComponent ) ; component = fixture . componentInstance ; fixture . detectChanges ( ) ; } ) ; it ( 'should create' , ( ) => { expect ( component ) . toBeTruthy ( ) ; } ) ; } ) ;