2016-06-01 10:29:15 +05:30
|
|
|
import 'polyfills';
|
|
|
|
|
2016-07-30 16:14:43 +05:30
|
|
|
import expect from 'unexpected';
|
|
|
|
expect.use(require('unexpected-sinon'));
|
|
|
|
|
2016-12-04 17:41:23 +05:30
|
|
|
if (!window.localStorage) {
|
|
|
|
window.localStorage = {
|
|
|
|
getItem(key) {
|
2016-12-06 00:44:38 +05:30
|
|
|
return this[key] || null;
|
2016-12-04 17:41:23 +05:30
|
|
|
},
|
|
|
|
setItem(key, value) {
|
|
|
|
this[key] = value;
|
|
|
|
},
|
|
|
|
removeItem(key) {
|
|
|
|
delete this[key];
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
window.sessionStorage = {
|
|
|
|
...window.localStorage
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2017-05-26 01:22:00 +05:30
|
|
|
// require all modules ending in ".test.js" from the
|
2016-03-21 11:46:37 +05:30
|
|
|
// current directory and all subdirectories
|
2016-07-30 16:14:43 +05:30
|
|
|
const testsContext = require.context('.', true, /\.test\.jsx?$/);
|
2016-03-21 11:46:37 +05:30
|
|
|
testsContext.keys().forEach(testsContext);
|