Deprecate setupTestingRouter

docs(router): deprecate setupTestingRouter (#48008)
Deprecate setupTestingRouterdocsdeprecate setuptestingrouter router

Committed by atscott

commit message
docs(router): deprecate setupTestingRouter (#48008)

The `setupTestingRouter` function is not necessary. The `Router` can be fully
initialized through the DI configuration in the same way as it is in
production. Tests should use `provideRouter` or `RouterTestingModule`.
 
PR Close #48008

Editor assessment

This is what a deprecation notice should look like. `docs(router)` is appropriate for an API-doc change, the subject names the exact symbol, and the body justifies the decision — the function "is not necessary" because DI achieves the same configuration — then prescribes replacements: `provideRouter` or `RouterTestingModule`. That guidance converts a warning into actionable migration advice, ideal for changelog extraction. Only consideration: if any runtime behavior changed alongside, a `feat` or breaking marker would be needed; as documented, it is exemplary.

Browse categories

More docs examples · Back to search