11import { TestBed , ComponentFixture } from '@angular/core/testing' ;
2- import { skip , take , tap } from 'rxjs/operators' ;
2+ import { skip , take } from 'rxjs/operators' ;
33import { MockStore , provideMockStore } from '@ngrx/store/testing' ;
44import {
55 Store ,
@@ -10,10 +10,12 @@ import {
1010 createFeatureSelector ,
1111} from '@ngrx/store' ;
1212import { INCREMENT } from '../../spec/fixtures/counter' ;
13- import { Component , OnInit } from '@angular/core' ;
13+ import { Component } from '@angular/core' ;
1414import { Observable } from 'rxjs' ;
1515import { By } from '@angular/platform-browser' ;
1616
17+ import * as store from '@ngrx/store' ;
18+
1719interface TestAppSchema {
1820 counter1 : number ;
1921 counter2 : number ;
@@ -40,6 +42,8 @@ describe('Mock Store', () => {
4042 ) ;
4143
4244 beforeEach ( ( ) => {
45+ spyOn ( store , 'setNgrxMockEnvironment' ) . and . callThrough ( ) ;
46+
4347 TestBed . configureTestingModule ( {
4448 providers : [
4549 provideMockStore ( {
@@ -63,6 +67,10 @@ describe('Mock Store', () => {
6367 mockStore . resetSelectors ( ) ;
6468 } ) ;
6569
70+ it ( 'should set NgrxMockEnvironment' , ( ) => {
71+ expect ( store . setNgrxMockEnvironment ) . toHaveBeenCalledWith ( true ) ;
72+ } ) ;
73+
6674 it ( 'should provide the same instance with Store and MockStore' , ( ) => {
6775 const fromStore = TestBed . inject ( Store ) ;
6876 const fromMockStore = TestBed . inject ( MockStore ) ;
0 commit comments