Set chrome in the global scope during setup so that it is mocked in imported modules. Add a setup file to jest.config.js: ...