Skip to content

Commit

Permalink
docs(router): deprecate RouterTestingModule (#54466)
Browse files Browse the repository at this point in the history
Deprecate `RouterTestingModule` as it is no longer needed or useful and
is not actively maintained.

fixes #54461

PR Close #54466
  • Loading branch information
atscott authored and alxhub committed Feb 20, 2024
1 parent fcfef52 commit a9741e6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion goldens/public-api/router/testing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class RouterTestingHarness {
get routeNativeElement(): HTMLElement | null;
}

// @public
// @public @deprecated
export class RouterTestingModule {
// (undocumented)
static withRoutes(routes: Routes, config?: ExtraOptions): ModuleWithProviders<RouterTestingModule>;
Expand Down
5 changes: 5 additions & 0 deletions packages/router/testing/src/router_testing_module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ function throwInvalidConfigError(parameter: string): never {
* ```
*
* @publicApi
* @deprecated Use `provideRouter` or `RouterModule`/`RouterModule.forRoot` instead.
* This module was previously used to provide a helpful collection of test fakes,
* most notably those for `Location` and `LocationStrategy`. These are generally not
* required anymore, as `MockPlatformLocation` is provided in `TestBed` by default.
* However, you can use them directly with `provideLocationMocks`.
*/
@NgModule({
exports: [RouterModule],
Expand Down

0 comments on commit a9741e6

Please sign in to comment.