@@ -9,8 +9,7 @@ import { resizeObserverIgnoreError } from './helper-utils.spec';
99 */
1010
1111export const configureTestSuite = ( configureAction ?: ( ) => TestBed ) => {
12-
13- const testBed : any = getTestBed ( ) ;
12+ const testBed = getTestBed ( ) ;
1413 const originReset = testBed . resetTestingModule ;
1514
1615 const clearStyles = ( ) => {
@@ -21,10 +20,12 @@ export const configureTestSuite = (configureAction?: () => TestBed) => {
2120 document . querySelectorAll ( 'svg' ) . forEach ( tag => tag . remove ( ) ) ;
2221 } ;
2322
23+ let _resizerSub : jasmine . Spy < OnErrorEventHandlerNonNull > ;
24+
2425 beforeAll ( ( ) => {
25- testBed . resetTestingModule ( ) ;
26- testBed . resetTestingModule = ( ) => TestBed ;
27- resizeObserverIgnoreError ( ) ;
26+ // testBed.resetTestingModule();
27+ testBed . resetTestingModule = ( ) => testBed ;
28+ _resizerSub = resizeObserverIgnoreError ( ) ;
2829 } ) ;
2930
3031 if ( configureAction ) {
@@ -36,20 +37,21 @@ export const configureTestSuite = (configureAction?: () => TestBed) => {
3637 afterEach ( ( ) => {
3738 clearStyles ( ) ;
3839 clearSVGContainer ( ) ;
39- testBed . _activeFixtures . forEach ( ( fixture : ComponentFixture < any > ) => {
40+ ( testBed as any ) . _activeFixtures . forEach ( ( fixture : ComponentFixture < any > ) => {
4041 const element = fixture . debugElement . nativeElement as HTMLElement ;
41- fixture . destroy ( ) ;
42+ // fixture.destroy();
4243 // If the fixture element ID changes, then it's not properly disposed
4344 element ?. remove ( ) ;
4445 } ) ;
4546 // reset ViewEngine TestBed
46- testBed . _instantiated = false ;
47+ ( testBed as any ) . _instantiated = false ;
4748 // reset Ivy TestBed
48- testBed . _testModuleRef = null ;
49+ ( testBed as any ) . _testModuleRef = null ;
4950 } ) ;
5051
5152 afterAll ( ( ) => {
5253 testBed . resetTestingModule = originReset ;
5354 testBed . resetTestingModule ( ) ;
55+ _resizerSub = null ;
5456 } ) ;
5557} ;
0 commit comments