fennec-fe/tests/__mocks__/browserMocks.js
Ivan Li 57eb3d317b feat(projects): 左侧项目菜单。
feat: tailwindcss + mobx + apollo.
2021-02-01 22:22:38 +08:00

22 lines
466 B
JavaScript

// 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
}); */