accounts-frontend/jest/setupAfterEnv.js

24 lines
440 B
JavaScript
Raw Normal View History

import 'app/polyfills';
2019-01-14 22:40:25 +02:00
import { configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
configure({ adapter: new Adapter() });
2016-07-30 13:44:43 +03:00
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,
};
}