import { Store } from '@ngrx/store' ; import { ConsoleService , LogService } from '../../core/index' ; import { ANALYTICS_PROVIDERS } from '../../analytics/index' ; import { WindowMock } from '../mocks/window.mock' ; import { StoreMock } from '../mocks/@ngrx/store.mock' ; export function TEST_COMMON_PROVIDERS ( options ? ) { let providers = [ { provide : ConsoleService , useValue : console } , LogService , ANALYTICS_PROVIDERS ] ; if ( options ) { if ( options . state ) { providers . push ( { provide : Store , useClass : StoreMock } ) ; } } return providers ; }