(href: string)
| 9 | const originalWindow = globalThis.window; |
| 10 | |
| 11 | const setLocation = (href: string): void => { |
| 12 | Object.defineProperty(globalThis, "window", { |
| 13 | configurable: true, |
| 14 | value: { location: new URL(href) }, |
| 15 | }); |
| 16 | }; |
| 17 | |
| 18 | afterEach(() => { |
| 19 | if (originalWindow) { |