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';
7
7
import { AnyAction , Reducer } from 'redux' ;
8
8
import { CoreModule } from '../../core/module' ;
9
9
import { AnimalComponent } from './component' ;
10
+ import { BrowserDynamicTestingModule , platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing' ;
10
11
11
12
type ConfigureSubStoreFn = (
12
13
basePath : ( string | number ) [ ] ,
@@ -19,6 +20,12 @@ describe('AnimalComponent', () => {
19
20
let spyConfigureSubStore : ConfigureSubStoreFn ;
20
21
21
22
beforeEach ( async ( ( ) => {
23
+ TestBed . resetTestEnvironment ( ) ;
24
+ TestBed . initTestEnvironment (
25
+ BrowserDynamicTestingModule ,
26
+ platformBrowserDynamicTesting ( ) ,
27
+ ) ;
28
+
22
29
spyConfigureSubStore = spyOn (
23
30
MockNgRedux . mockInstance ! ,
24
31
'configureSubStore' ,
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import { toArray } from 'rxjs/operators';
12
12
import { AnimalAPIActions } from '../animals/api/actions' ;
13
13
import { ANIMAL_TYPES } from '../animals/model' ;
14
14
import { ElephantPageComponent } from './page' ;
15
+ import { BrowserDynamicTestingModule , platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing' ;
15
16
16
17
@Component ( {
17
18
selector : 'zoo-animal-list' ,
@@ -26,6 +27,12 @@ class MockAnimalListComponent {
26
27
27
28
describe ( 'Elephant Page Container' , ( ) => {
28
29
beforeEach ( ( ) => {
30
+ TestBed . resetTestEnvironment ( ) ;
31
+ TestBed . initTestEnvironment (
32
+ BrowserDynamicTestingModule ,
33
+ platformBrowserDynamicTesting ( ) ,
34
+ ) ;
35
+
29
36
TestBed . configureTestingModule ( {
30
37
declarations : [ ElephantPageComponent , MockAnimalListComponent ] ,
31
38
imports : [ NgReduxTestingModule ] ,
Original file line number Diff line number Diff line change @@ -6,9 +6,16 @@ import { TestBed } from '@angular/core/testing';
6
6
7
7
import { toArray } from 'rxjs/operators' ;
8
8
import { FeedbackFormComponent } from './page' ;
9
+ import { BrowserDynamicTestingModule , platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing' ;
9
10
10
11
describe ( 'Feedback Form Component' , ( ) => {
11
12
beforeEach ( ( ) => {
13
+ TestBed . resetTestEnvironment ( ) ;
14
+ TestBed . initTestEnvironment (
15
+ BrowserDynamicTestingModule ,
16
+ platformBrowserDynamicTesting ( ) ,
17
+ ) ;
18
+
12
19
TestBed . configureTestingModule ( {
13
20
declarations : [ FeedbackFormComponent ] ,
14
21
imports : [ NgReduxTestingModule ] ,
Original file line number Diff line number Diff line change @@ -6,13 +6,20 @@ import {
6
6
import { async , getTestBed , TestBed } from '@angular/core/testing' ;
7
7
import { RootEpics } from './epics' ;
8
8
import { StoreModule } from './module' ;
9
+ import { BrowserDynamicTestingModule , platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing' ;
9
10
10
11
describe ( 'Store Module' , ( ) => {
11
12
let mockNgRedux : NgRedux < any > ;
12
13
let devTools : DevToolsExtension ;
13
14
let mockEpics : Partial < RootEpics > ;
14
15
15
16
beforeEach ( async ( ( ) => {
17
+ TestBed . resetTestEnvironment ( ) ;
18
+ TestBed . initTestEnvironment (
19
+ BrowserDynamicTestingModule ,
20
+ platformBrowserDynamicTesting ( ) ,
21
+ ) ;
22
+
16
23
TestBed . configureTestingModule ( {
17
24
imports : [ NgReduxTestingModule ] ,
18
25
} )
You can’t perform that action at this time.
0 commit comments