mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-07-01 04:33:23 +05:30
31 lines
769 B
JavaScript
31 lines
769 B
JavaScript
import 'polyfills';
|
|
import { configure } from 'enzyme';
|
|
import Adapter from 'enzyme-adapter-react-16';
|
|
import expect from 'unexpected';
|
|
|
|
expect.use(require('unexpected-sinon'));
|
|
configure({ adapter: new Adapter() });
|
|
|
|
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
|
|
};
|
|
}
|
|
|
|
// require all modules ending in ".test.js" from the
|
|
// current directory and all subdirectories
|
|
const testsContext = require.context('.', true, /\.test\.jsx?$/);
|
|
testsContext.keys().forEach(testsContext);
|