accounts-frontend/jest/setupAfterEnv.js
2020-05-24 02:08:24 +03:00

21 lines
407 B
JavaScript

import 'app/polyfills';
import '@testing-library/jest-dom';
if (!window.localStorage) {
window.localStorage = {
getItem(key) {
return this[key] || null;
},
setItem(key, value) {
this[key] = value;
},
removeItem(key) {
delete this[key];
},
};
window.sessionStorage = {
...window.localStorage,
};
}