File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed
Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change 1+ import { TestBed , waitForAsync } from '@angular/core/testing' ;
2+ import { RouterTestingModule } from '@angular/router/testing' ;
3+ import { AppRoutingModule } from './app-routing.module' ;
4+
5+ describe ( 'AppRoutingModule' , ( ) => {
6+ beforeEach ( waitForAsync ( ( ) => {
7+ TestBed . configureTestingModule ( {
8+ imports : [
9+ RouterTestingModule
10+ ] ,
11+ declarations : [
12+ AppRoutingModule
13+ ] ,
14+ } ) . compileComponents ( ) ;
15+ } ) ) ;
16+
17+ it ( 'should create routes when not legacy' , ( ) => {
18+ const fixture = TestBed . createComponent ( AppRoutingModule ) ;
19+ const app = fixture . componentInstance ;
20+ expect ( app . routes ) . toBeTruthy ( ) ;
21+ } ) ;
22+
23+ } ) ;
Original file line number Diff line number Diff line change @@ -51,4 +51,6 @@ if (isNotLegacy) {
5151 imports : [ RouterModule . forRoot ( routes ) ] ,
5252 exports : [ RouterModule ] ,
5353} )
54- export class AppRoutingModule { }
54+ export class AppRoutingModule {
55+ routes = routes ;
56+ }
You can’t perform that action at this time.
0 commit comments