Full-page navigation, behind a seam so tests can observe it.
Assigning window.location.href directly is untestable under jsdom: location
is a non-configurable own accessor, so it can be neither replaced nor spied on,
and jsdom refuses the navigation with "Not implemented". Routing through this
module lets tests jest.spyOn it instead.
Full-page navigation, behind a seam so tests can observe it.
Assigning
window.location.hrefdirectly is untestable under jsdom:locationis a non-configurable own accessor, so it can be neither replaced nor spied on, and jsdom refuses the navigation with "Not implemented". Routing through this module lets testsjest.spyOnit instead.