accounts-frontend/jest/setupAfterEnv.js

21 lines
407 B
JavaScript
Raw Permalink Normal View History

import 'app/polyfills';
import '@testing-library/jest-dom';
2016-07-30 16:14:43 +05:30
if (!window.localStorage) {
2020-05-24 04:38:24 +05:30
window.localStorage = {
getItem(key) {
return this[key] || null;
},
setItem(key, value) {
this[key] = value;
},
removeItem(key) {
delete this[key];
},
};
2020-05-24 04:38:24 +05:30
window.sessionStorage = {
...window.localStorage,
};
}