accounts-frontend/jest/setupAfterEnv.js

21 lines
353 B
JavaScript
Raw Normal View History

import 'app/polyfills';
import '@testing-library/jest-dom';
2016-07-30 16:14:43 +05:30
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,
};
}