18 lines
314 B
JavaScript
18 lines
314 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(),
|
|
},
|
|
navigator: {
|
|
platform: 'Win',
|
|
},
|
|
};
|
|
}
|