import { NgrxConfigService } from './ngrx-config.service'; /* * Testing a Service * More info: https://angular.io/docs/ts/latest/guide/testing.html */ import { logger, storeStateGuard } from './util/meta-reducer-factory'; import { TestBed, async, inject } from '@angular/core/testing'; const env = { production: false }; describe('ngrx-config-service', () => { let configService; beforeEach(() => { TestBed.configureTestingModule({ providers: [ { provide: 'env', useValue: env }, ] }); }); // you can also wrap inject() with async() for asynchronous tasks // it('...', async(inject([...], (...) => {})); it('StoreDevtools should be create', () => { configService = TestBed.get(NgrxConfigService); const ans = configService.StoreDevtools; expect(ans).not.toBe([]); }); it('metaReducers should be create', () => { configService = TestBed.get(NgrxConfigService); const ans = configService.metaReducers; expect(ans).not.toBe([ storeStateGuard ]); }); });