Feature/unit tests (#184)
This commit is contained in:
committed by
GitHub
parent
255e4d8883
commit
ec46a6f760
14
core/test/setupEnv.js
Normal file
14
core/test/setupEnv.js
Normal file
@ -0,0 +1,14 @@
|
||||
global.TextEncoder = TextEncoder;
|
||||
global.TextDecoder = TextDecoder;
|
||||
|
||||
if (typeof window === 'undefined') {
|
||||
global.window = {
|
||||
URL: {
|
||||
createObjectURL: jest.fn(),
|
||||
},
|
||||
localStorage: {
|
||||
removeItem: jest.fn(),
|
||||
getItem: jest.fn(),
|
||||
},
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user