Currently, I am implementing unit test for my project and there is a file that contained window.location.href.
window.location.href
I want to mock this to test and here is m
Can rewrite window.location by delete this global in every test.
delete global.window.location; const href = 'http://localhost:3000'; global.window.location = { href };