2022-12-04 22:15:59 -05:00
|
|
|
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
|
|
|
};
|
|
|
|
}
|
2022-12-13 10:31:35 -05:00
|
|
|
|
|
|
|
global.URL.createObjectURL = jest.fn();
|
2022-12-22 12:11:42 -05:00
|
|
|
|
2023-01-03 12:08:42 -05:00
|
|
|
jest.mock('../src/formats/util/j-toml');
|