Set window location in tests more consistently
Jest/JSDOM provides a more robust and simple way of setting the mocked `window.location`, which preserves all the expected behaviours and properties of `window.location`. By using it, we can get rid of hacks which attempt to recreate behaviours of `window.location` that we lost by mutating it ourselves (for instance, adding a `toString` method).
Showing
Please register or sign in to comment