Closed
Description
Hi,
Versions:
"@angular/router": "~9.1.0",
"@testing-library/angular": "^9.1.0",
"@testing-library/jest-dom": "^5.1.1",
I'm trying to test a component that has behaviour based on its query params.
I have my routing configuration:
routes: [
{ path: 'register', component: RegistrationComponent }
]
Then, in the test im trying to navigate to it with a query param:
await navigate('register?token=abc');
However, I'm getting the following error:
Cannot match any routes. URL Segment: 'register%3Ftoken%3Dabc'
Is there a better way to test it? Or am I getting something wrong?