Open
Description
Angular introduced RouterTestingHarness as a utility for testing a component that depends on the router.
RouterTestingHarness manages a root component to instantiate <router-outlet>
and returns routed component by navigateByUrl(url, component)
method. AFAIK, there is a conflict with the testing-library's render()
approach. The responsibility for instantiating a ComponentFixture must be one or the other.
So, I can't suggest a specific solution yet, but I think that testing involving Router can be complex and this is precisely the kind of area that the Testing Library should help with. It would be desirable to provide a means to escape from MockRouter and MockActivatedRoute while still being able to use them with the Testing Library.
Metadata
Metadata
Assignees
Labels
No labels