diff --git a/packages/schematics/angular/application/files/module-files/src/app/app.component.spec.ts.template b/packages/schematics/angular/application/files/module-files/src/app/app.component.spec.ts.template index eef727c672ca..c567ade0de2c 100644 --- a/packages/schematics/angular/application/files/module-files/src/app/app.component.spec.ts.template +++ b/packages/schematics/angular/application/files/module-files/src/app/app.component.spec.ts.template @@ -1,12 +1,12 @@ import { TestBed } from '@angular/core/testing';<% if (routing) { %> -import { RouterTestingModule } from '@angular/router/testing';<% } %> +import { RouterModule } from '@angular/router';<% } %> import { AppComponent } from './app.component'; describe('AppComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({<% if (routing) { %> imports: [ - RouterTestingModule + RouterModule.forRoot([]) ],<% } %> declarations: [ AppComponent diff --git a/tests/legacy-cli/e2e/assets/15.0-project/src/app/app.component.spec.ts b/tests/legacy-cli/e2e/assets/15.0-project/src/app/app.component.spec.ts index b7b4722d8cbc..803558e830fb 100644 --- a/tests/legacy-cli/e2e/assets/15.0-project/src/app/app.component.spec.ts +++ b/tests/legacy-cli/e2e/assets/15.0-project/src/app/app.component.spec.ts @@ -1,12 +1,12 @@ import { TestBed } from '@angular/core/testing'; -import { RouterTestingModule } from '@angular/router/testing'; +import { RouterModule } from '@angular/router'; import { AppComponent } from './app.component'; describe('AppComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ imports: [ - RouterTestingModule + RouterModule.forRoot([]) ], declarations: [ AppComponent diff --git a/tests/legacy-cli/e2e/assets/18-ssr-project-webpack/src/app/app.component.spec.ts b/tests/legacy-cli/e2e/assets/18-ssr-project-webpack/src/app/app.component.spec.ts index 2f9f07ca654a..4e872828790f 100644 --- a/tests/legacy-cli/e2e/assets/18-ssr-project-webpack/src/app/app.component.spec.ts +++ b/tests/legacy-cli/e2e/assets/18-ssr-project-webpack/src/app/app.component.spec.ts @@ -1,10 +1,10 @@ import { TestBed } from '@angular/core/testing'; -import { RouterTestingModule } from '@angular/router/testing'; +import { RouterModule } from '@angular/router'; import { AppComponent } from './app.component'; describe('AppComponent', () => { beforeEach(() => TestBed.configureTestingModule({ - imports: [RouterTestingModule], + imports: [RouterModule.forRoot([])], declarations: [AppComponent] }));