File tree Expand file tree Collapse file tree 4 files changed +28
-0
lines changed
packages/example-app/src/app Expand file tree Collapse file tree 4 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import { async, TestBed } from '@angular/core/testing';
77import { AnyAction , Reducer } from 'redux' ;
88import { CoreModule } from '../../core/module' ;
99import { AnimalComponent } from './component' ;
10+ import { BrowserDynamicTestingModule , platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing' ;
1011
1112type ConfigureSubStoreFn = (
1213 basePath : ( string | number ) [ ] ,
@@ -19,6 +20,12 @@ describe('AnimalComponent', () => {
1920 let spyConfigureSubStore : ConfigureSubStoreFn ;
2021
2122 beforeEach ( async ( ( ) => {
23+ TestBed . resetTestEnvironment ( ) ;
24+ TestBed . initTestEnvironment (
25+ BrowserDynamicTestingModule ,
26+ platformBrowserDynamicTesting ( ) ,
27+ ) ;
28+
2229 spyConfigureSubStore = spyOn (
2330 MockNgRedux . mockInstance ! ,
2431 'configureSubStore' ,
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import { toArray } from 'rxjs/operators';
1212import { AnimalAPIActions } from '../animals/api/actions' ;
1313import { ANIMAL_TYPES } from '../animals/model' ;
1414import { ElephantPageComponent } from './page' ;
15+ import { BrowserDynamicTestingModule , platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing' ;
1516
1617@Component ( {
1718 selector : 'zoo-animal-list' ,
@@ -26,6 +27,12 @@ class MockAnimalListComponent {
2627
2728describe ( 'Elephant Page Container' , ( ) => {
2829 beforeEach ( ( ) => {
30+ TestBed . resetTestEnvironment ( ) ;
31+ TestBed . initTestEnvironment (
32+ BrowserDynamicTestingModule ,
33+ platformBrowserDynamicTesting ( ) ,
34+ ) ;
35+
2936 TestBed . configureTestingModule ( {
3037 declarations : [ ElephantPageComponent , MockAnimalListComponent ] ,
3138 imports : [ NgReduxTestingModule ] ,
Original file line number Diff line number Diff line change @@ -6,9 +6,16 @@ import { TestBed } from '@angular/core/testing';
66
77import { toArray } from 'rxjs/operators' ;
88import { FeedbackFormComponent } from './page' ;
9+ import { BrowserDynamicTestingModule , platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing' ;
910
1011describe ( 'Feedback Form Component' , ( ) => {
1112 beforeEach ( ( ) => {
13+ TestBed . resetTestEnvironment ( ) ;
14+ TestBed . initTestEnvironment (
15+ BrowserDynamicTestingModule ,
16+ platformBrowserDynamicTesting ( ) ,
17+ ) ;
18+
1219 TestBed . configureTestingModule ( {
1320 declarations : [ FeedbackFormComponent ] ,
1421 imports : [ NgReduxTestingModule ] ,
Original file line number Diff line number Diff line change @@ -6,13 +6,20 @@ import {
66import { async , getTestBed , TestBed } from '@angular/core/testing' ;
77import { RootEpics } from './epics' ;
88import { StoreModule } from './module' ;
9+ import { BrowserDynamicTestingModule , platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing' ;
910
1011describe ( 'Store Module' , ( ) => {
1112 let mockNgRedux : NgRedux < any > ;
1213 let devTools : DevToolsExtension ;
1314 let mockEpics : Partial < RootEpics > ;
1415
1516 beforeEach ( async ( ( ) => {
17+ TestBed . resetTestEnvironment ( ) ;
18+ TestBed . initTestEnvironment (
19+ BrowserDynamicTestingModule ,
20+ platformBrowserDynamicTesting ( ) ,
21+ ) ;
22+
1623 TestBed . configureTestingModule ( {
1724 imports : [ NgReduxTestingModule ] ,
1825 } )
You can’t perform that action at this time.
0 commit comments