(config: any, win: any = Object.create(window))
| 1 | export const configureBrowser = (config: any, win: any = Object.create(window)) => { |
| 2 | for (const attributeKey in config) { |
| 3 | // eslint-disable-next-line no-prototype-builtins |
| 4 | if (config.hasOwnProperty(attributeKey)) { |
| 5 | win[attributeKey] = config[attributeKey]; |
| 6 | } |
| 7 | } |
| 8 | |
| 9 | return win; |
| 10 | }; |
| 11 | |
| 12 | export const mockMatchMedia = (media: string[] = []) => { |
| 13 | return jest.fn().mockImplementation((query) => { |