We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
window.history.pushState not working as expected when jest-location-mock is used. clone this repo to reproduce. example (below test fails.)
test('route should be changed', ()=>{ window.history.pushState({}, 'Test page', '/123') expect(window.location.href).toEqual('https://localhost/123') })
The text was updated successfully, but these errors were encountered:
Currently, this project only mocks window.location and not the history or navigation APIs. This would be a good future feature 😸
window.location
Sorry, something went wrong.
After digging more into #123, it looks like your issue is also a bug with how JSDOM has limited window.history support, and this mock replaces it.
window.history
evelynhathaway
Successfully merging a pull request may close this issue.
window.history.pushState not working as expected when jest-location-mock is used.
clone this repo to reproduce.
example (below test fails.)
The text was updated successfully, but these errors were encountered: