New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(common): add provideLocationMocks()
function to provide Location mocks
#47674
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can remove this now as well: https://github.com/angular/angular/blob/main/packages/router/testing/src/provide_router_for_testing.ts
And then all references to that will have to do provideRouter(...), provideLocationMocks()
…on mocks This commit adds the `provideLocationMocks()` function that returns mocks for the `Location` and `LocationStrategy` classes. This function can be used in tests to configure an environment where it's possible to fire simulated location events (helpful when testing Router configuration).
85fb798
to
503c4cb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reviewed-for: public-api
Merge-assistance (cc @jessicajaniuk): this PR is ready for merge, but needs one more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reviewed-for: public-api
This PR was merged into the repository by commit c0c7efa. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This commit adds the
provideLocationMocks()
function that returns mocks for theLocation
andLocationStrategy
classes. This function can be used in tests to configure an environment where it's possible to fire simulated location events (helpful when testing Router configuration).PR Type
What kind of change does this PR introduce?
Does this PR introduce a breaking change?