RouterTestingModule
RouterTestingModule
Stable Class
What it does
Sets up the router to be used for testing.
How to use
beforeEach(() => { TestBed.configureTestModule({ imports: [ RouterTestingModule.withRoutes( [{path: '', component: BlankCmp}, {path: 'simple', component: SimpleCmp}])] ) ] }); });
Class Overview
class RouterTestingModule { static withRoutes(routes: Routes) : ModuleWithProviders }