accounts-frontend/tests/index.js

28 lines
644 B
JavaScript
Raw Normal View History

import 'polyfills';
2016-07-30 16:14:43 +05:30
import expect from 'unexpected';
expect.use(require('unexpected-sinon'));
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" from the
// current directory and all subdirectories
2016-07-30 16:14:43 +05:30
const testsContext = require.context('.', true, /\.test\.jsx?$/);
testsContext.keys().forEach(testsContext);