import { inject , TestBed } from '@angular/core/testing' ; import { MapFacadeService } from './map-facade.service' ; import { Store , StoreModule } from '@ngrx/store' ; import { IMapState , mapFeatureKey , MapReducer } from '../reducers/map.reducer' ; import { ImageryCommunicatorService , ImageryModule } from '@ansyn/imagery' ; describe ( 'MapFacadeService' , ( ) => { let service ; let store ; beforeEach ( ( ) => { TestBed . configureTestingModule ( { providers : [ MapFacadeService , ImageryCommunicatorService ] , imports : [ ImageryModule , StoreModule . forRoot ( { [ mapFeatureKey ] : MapReducer } ) ] } ) ; } ) ; beforeEach ( inject ( [ MapFacadeService , Store ] , ( _mapFacadeService , _store ) => { service = _mapFacadeService ; store = _store ; } ) ) ; it ( 'service is initilaized' , ( ) => { expect ( service ) . toBeTruthy ( ) ; } ) ; describe ( 'check all dispatch events' , ( ) => { beforeEach ( ( ) => { spyOn ( store , 'dispatch' ) ; } ) ; } ) ; } ) ;