mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
This commit updates the documentation on testing the `Router` to use the `RouterTestingHarness` rather than stubs. The stubs described in the previous form of this document actually creates tests which are incapable of catching bugs related to the component's interaction with the `Router`. In addition, managing the stubs is more difficult than using the real `Router` classes. Stubbing something like the `RouterLink` is quite harmful because it neither tests the actual URL being created, nor the end result of the navigation. There have been serveral bug fixes in the Router over the years the would change the outcome of these but would not be caught by tests which create a stub. PR Close #48553 |
||
|---|---|---|
| .. | ||
| e2e/src | ||
| src | ||
| BUILD.bazel | ||
| example-config.json | ||
| stackblitz.json | ||