I have a test that imports a component that in turn imports a helper file that uses the window object to pull out a query string parameter. I get the following erro
window
Not sure but i think you could do it with jest.fn()
jest.fn()
global.window = jest.fn(() => { location: { ... } })
maybe even as window = jest.fn(...)
window = jest.fn(...)