@@ -215,7 +215,7 @@ describe('igxOverlay', () => {
215215 } ;
216216
217217 describe ( 'Pure Unit Test' , ( ) => {
218- configureTestSuite ( ) ;
218+ configureTestSuite ( { checkLeaks : true } ) ;
219219 let mockElement : any ;
220220 let mockElementRef : any ;
221221 let mockApplicationRef : any ;
@@ -297,6 +297,9 @@ describe('igxOverlay', () => {
297297 overlay = new IgxOverlayService (
298298 mockApplicationRef , mockDocument , mockNgZone , mockPlatformUtil , mockAnimationService ) ;
299299 } ) ;
300+ afterEach ( ( ) => {
301+ overlay . ngOnDestroy ( ) ;
302+ } ) ;
300303
301304 it ( 'Should set cursor to pointer on iOS' , ( ) => {
302305 mockPlatformUtil . isIOS = true ;
@@ -365,7 +368,7 @@ describe('igxOverlay', () => {
365368 } ) ;
366369
367370 describe ( 'Unit Tests: ' , ( ) => {
368- configureTestSuite ( ) ;
371+ configureTestSuite ( { checkLeaks : true } ) ;
369372 beforeEach ( waitForAsync ( ( ) => {
370373 TestBed . configureTestingModule ( {
371374 imports : [ NoopAnimationsModule , SimpleDynamicWithDirectiveComponent ]
@@ -1412,14 +1415,12 @@ describe('igxOverlay', () => {
14121415 } ) ;
14131416
14141417 describe ( 'Unit Tests - Scroll Strategies: ' , ( ) => {
1418+ configureTestSuite ( { checkLeaks : true } ) ;
14151419 beforeEach ( waitForAsync ( ( ) => {
14161420 TestBed . configureTestingModule ( {
14171421 imports : [ NoopAnimationsModule , SimpleDynamicWithDirectiveComponent ]
14181422 } ) ;
14191423 } ) ) ;
1420- afterAll ( ( ) => {
1421- TestBed . resetTestingModule ( ) ;
1422- } ) ;
14231424 it ( 'Should properly initialize Scroll Strategy - Block.' , fakeAsync ( async ( ) => {
14241425 TestBed . overrideComponent ( EmptyPageComponent , {
14251426 set : {
@@ -1589,7 +1590,7 @@ describe('igxOverlay', () => {
15891590 } ) ;
15901591
15911592 describe ( 'Integration tests: ' , ( ) => {
1592- configureTestSuite ( ) ;
1593+ configureTestSuite ( { checkLeaks : true } ) ;
15931594 beforeEach ( waitForAsync ( ( ) => {
15941595 TestBed . configureTestingModule ( {
15951596 imports : [ NoopAnimationsModule , SimpleDynamicWithDirectiveComponent ]
@@ -3577,6 +3578,7 @@ describe('igxOverlay', () => {
35773578 } ) ;
35783579
35793580 describe ( 'Integration tests - Scroll Strategies: ' , ( ) => {
3581+ configureTestSuite ( { checkLeaks : true } ) ;
35803582 beforeEach ( waitForAsync ( ( ) => {
35813583 TestBed . configureTestingModule ( {
35823584 imports : [ NoopAnimationsModule , SimpleDynamicWithDirectiveComponent ]
@@ -4441,6 +4443,7 @@ describe('igxOverlay', () => {
44414443 } ) ;
44424444
44434445 describe ( 'Integration tests p3 (IgniteUI components): ' , ( ) => {
4446+ configureTestSuite ( { checkLeaks : true } ) ;
44444447 beforeEach ( waitForAsync ( ( ) => {
44454448 TestBed . configureTestingModule ( {
44464449 imports : [ NoopAnimationsModule , SimpleDynamicWithDirectiveComponent ]
0 commit comments