Skip to content

Commit 3d7a063

Browse files
committed
test(nav-drawer): reset testing module after all nav-drawer tests, #4426
1 parent 1f222f7 commit 3d7a063

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

projects/igniteui-angular/src/lib/navigation-drawer/navigation-drawer.component.spec.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
1-
import {
2-
async,
3-
ComponentFixture,
4-
fakeAsync,
5-
TestBed,
6-
tick
7-
} from '@angular/core/testing';
8-
1+
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
92
import { Component, ViewChild, PLATFORM_ID } from '@angular/core';
103
import { By } from '@angular/platform-browser';
114
import { wait } from '../test-utils/ui-interactions.spec';
@@ -46,6 +39,10 @@ describe('Navigation Drawer', () => {
4639
jasmine.DEFAULT_TIMEOUT_INTERVAL = oldTimeout;
4740
});
4841

42+
afterAll(() => {
43+
TestBed.resetTestingModule();
44+
});
45+
4946
it('should initialize without DI service', async(() => {
5047
TestBed.compileComponents().then(() => {
5148
const fixture = TestBed.createComponent(TestComponent);
@@ -561,6 +558,7 @@ describe('Navigation Drawer', () => {
561558
const originalWidth = window.innerWidth;
562559
const platformUtil: PlatformUtil = new PlatformUtil(TestBed.get(PLATFORM_ID));
563560
const drawer = new IgxNavigationDrawerComponent(null, null, null, null, platformUtil);
561+
564562
// re-enable `getWindowWidth`
565563
const widthSpy = (widthSpyOverride as jasmine.Spy).and.callThrough();
566564
let width = widthSpy.call(drawer);

0 commit comments

Comments
 (0)