I using create-react-app with redux and log4javascript. I have started writing integration tests and running npm run test with --env=node. After I started using node, I am getting window is not defined error.
Is there a way to define window as global object while running jest tests? I have tried setting
global.window = jest.fn(() => {
location: { search: '' }
})
but still not working.