static-cms/core/test/setupEnv.js

18 lines
314 B
JavaScript
Raw Normal View History

2022-12-04 22:15:59 -05:00
global.TextEncoder = TextEncoder;
global.TextDecoder = TextDecoder;
if (typeof window === 'undefined') {
global.window = {
URL: {
createObjectURL: jest.fn(),
},
localStorage: {
removeItem: jest.fn(),
getItem: jest.fn(),
},
2022-12-11 09:03:53 -05:00
navigator: {
platform: 'Win',
},
2022-12-04 22:15:59 -05:00
};
}