packages/core/schematics/ng-generate/router-testing-module-migration/README.md
This migration automatically converts deprecated RouterTestingModule usages to the recommended modern APIs.
RouterTestingModule.withRoutes([...]) with RouterModule.forRoot([...]) for NgModule testsRouterTestingModule with RouterModule.forRoot([]) when no routes are providedproviders), moves to provideRouter([...]) instead@angular/router instead of @angular/router/testingrouter_testing_module_migration.ts - Main migration logic using TsurgeFunnelMigrationindex.ts - Entry point for the schematic../../test/router_testing_to_provide_router_spec.ts - Comprehensive test suiteMIGRATION_NOTES.md - Detailed documentation with examplesBUILD.bazel - Bazel build configurationThe migration runs automatically as part of ng update @angular/core for v21.0.0+.
To run manually:
ng update @angular/core --migrate-only router-testing-to-provide-router