static-cms/core/test/setupEnv.js
2022-12-04 22:15:59 -05:00

15 lines
267 B
JavaScript

global.TextEncoder = TextEncoder;
global.TextDecoder = TextDecoder;
if (typeof window === 'undefined') {
global.window = {
URL: {
createObjectURL: jest.fn(),
},
localStorage: {
removeItem: jest.fn(),
getItem: jest.fn(),
},
};
}