You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This popped up while trying to write tests that involved sessionStorage - there's no way to do things like change jsdom's window.location.href without having access to the jsdom instance itself.
Can we expose a reference to it as a global in setup script?
The text was updated successfully, but these errors were encountered:
Definitely. One workaround that I've used is that you can set window properties via global.window that is set up via jsdom-global. I recently helped someone with this who was trying to write some tests around window.WebSocket.
This popped up while trying to write tests that involved
sessionStorage
- there's no way to do things like change jsdom'swindow.location.href
without having access to the jsdom instance itself.Can we expose a reference to it as a global in setup script?
The text was updated successfully, but these errors were encountered: