Skip to content

Commit 03bf175

Browse files
committed
test(tabs/bottomnav): adding RouterTestingModule in the test files #4297
1 parent 37eba60 commit 03bf175

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

projects/igniteui-angular/src/lib/tabbar/tabbar.component.spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { AfterContentChecked, AfterViewChecked, Component, ContentChildren, QueryList, ViewChild } from '@angular/core';
22
import { async, TestBed } from '@angular/core/testing';
3+
import { RouterTestingModule } from '@angular/router/testing';
34
import { By } from '@angular/platform-browser';
45
import { IgxBottomNavComponent,
56
IgxBottomNavModule,
@@ -14,7 +15,7 @@ describe('TabBar', () => {
1415
beforeEach(async(() => {
1516
TestBed.configureTestingModule({
1617
declarations: [TabBarTestComponent, BottomTabBarTestComponent, TemplatedTabBarTestComponent],
17-
imports: [IgxBottomNavModule]
18+
imports: [IgxBottomNavModule, RouterTestingModule]
1819
})
1920
.compileComponents();
2021
}));

projects/igniteui-angular/src/lib/tabs/tabs.component.spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { Component, QueryList, ViewChild } from '@angular/core';
22
import { async, TestBed, fakeAsync, tick } from '@angular/core/testing';
3+
import { RouterTestingModule } from '@angular/router/testing';
34
import { IgxTabItemComponent } from './tab-item.component';
45
import { IgxTabsGroupComponent } from './tabs-group.component';
56
import { IgxTabsComponent, IgxTabsModule } from './tabs.component';
@@ -12,7 +13,7 @@ describe('IgxTabs', () => {
1213
beforeEach(async(() => {
1314
TestBed.configureTestingModule({
1415
declarations: [TabsTestComponent, TabsTest2Component, TemplatedTabsTestComponent, TabsTestSelectedTabComponent],
15-
imports: [IgxTabsModule, NoopAnimationsModule]
16+
imports: [IgxTabsModule, NoopAnimationsModule, RouterTestingModule]
1617
})
1718
.compileComponents();
1819
}));

0 commit comments

Comments
 (0)