import { ComponentFixture , TestBed , async } from '@angular/core/testing' ; import { NoopAnimationsModule } from '@angular/platform-browser/animations' ; import { MaterialModule } from '../material.module' ; import { WeatherService } from '../weather/weather.service' ; import { WeatherServiceFake } from '../weather/weather.service.fake' ; import { CurrentWeatherComponent } from './current-weather.component' ; describe ( 'CurrentWeatherComponent' , ( ) => { let component ; let fixture ; beforeEach ( async ( ( ) => { TestBed . configureTestingModule ( { declarations : [ CurrentWeatherComponent ] , providers : [ { provide : WeatherService , useClass : WeatherServiceFake } ] , imports : [ MaterialModule , NoopAnimationsModule ] , } ) . compileComponents ( ) ; } ) ) ; beforeEach ( ( ) => { fixture = TestBed . createComponent ( CurrentWeatherComponent ) ; component = fixture . componentInstance ; fixture . detectChanges ( ) ; } ) ; it ( 'should create' , ( ) => { expect ( component ) . toBeTruthy ( ) ; } ) ; } ) ;