Skip to content

Set window location in tests more consistently

Mark Florian requested to merge set-location-correctly-in-url-utils-spec into master

What does this MR do?

Correctly set window location

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).

Screenshots (strongly suggested)

n/a

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by Mark Florian

Merge request reports