feat(router): add syntax sugar for confuguring RouterTestingModule (#10906)

This commit is contained in:
Victor Savkin
2016-08-19 16:01:59 -07:00
committed by Kara
parent c56f3f2246
commit 53c99cfc95
2 changed files with 18 additions and 9 deletions

View File

@ -22,9 +22,11 @@ import {RouterTestingModule, SpyNgModuleFactoryLoader} from '../testing';
describe('Integration', () => {
beforeEach(() => {
TestBed.configureTestingModule({
imports: [RouterTestingModule, TestModule],
providers: [provideRoutes(
[{path: '', component: BlankCmp}, {path: 'simple', component: SimpleCmp}])]
imports: [
RouterTestingModule.withRoutes(
[{path: '', component: BlankCmp}, {path: 'simple', component: SimpleCmp}]),
TestModule
]
});
});