1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-07-31 18:50:14 +02:00

refactor tests and babel config. Fixes target browsers.

This is basically the change propagated from the current
default preact tempalate. Now the code compiles according to set
browsers.
This commit is contained in:
Kushagra Gour
2018-10-21 19:18:53 +05:30
parent ebffdb5ecb
commit 37d8e9801a
6 changed files with 18 additions and 11 deletions

View File

@@ -0,0 +1,21 @@
// Mock Browser API's which are not supported by JSDOM, e.g. ServiceWorker, LocalStorage
/**
* An example how to mock localStorage is given below 👇
*/
/*
// Mocks localStorage
const localStorageMock = (function() {
let store = {};
return {
getItem: (key) => store[key] || null,
setItem: (key, value) => store[key] = value.toString(),
clear: () => store = {}
};
})();
Object.defineProperty(window, 'localStorage', {
value: localStorageMock
}); */