2017-03-23 22:10:42 +00:00
|
|
|
import 'whatwg-fetch';
|
|
|
|
|
2017-01-09 21:59:52 +00:00
|
|
|
const localStorageMock = (function () {
|
|
|
|
let store = {};
|
|
|
|
|
|
|
|
return {
|
2017-03-03 20:09:08 +00:00
|
|
|
getItem (key) {
|
|
|
|
return store[key];
|
2017-01-09 21:59:52 +00:00
|
|
|
},
|
2017-03-03 20:09:08 +00:00
|
|
|
setItem (key, value) {
|
|
|
|
store[key] = value.toString();
|
2017-01-09 21:59:52 +00:00
|
|
|
},
|
2017-03-03 20:09:08 +00:00
|
|
|
clear () {
|
|
|
|
store = {};
|
2017-01-09 21:59:52 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
})();
|
|
|
|
|
|
|
|
global.localStorage = localStorageMock;
|
2017-10-10 08:58:13 +00:00
|
|
|
global.requestAnimationFrame = cb => process.nextTick(cb);
|
2017-06-01 02:04:27 +00:00
|
|
|
global.require = require;
|