accounts-frontend/jest/setupAfterEnv.js

24 lines
440 B
JavaScript
Raw Normal View History

import 'app/polyfills';
2019-01-15 02:10:25 +05:30
import { configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
configure({ adapter: new Adapter() });
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,
};
}