mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-03-06 18:09:10 +00:00
* move test folder * Update vitest files * rename test/utils to test/testUtils * Remove stray utils/gameManager Got put back from a rebase
28 lines
449 B
TypeScript
28 lines
449 B
TypeScript
const mockLocalStorage = (() => {
|
|
let store = {} as Storage;
|
|
|
|
return {
|
|
getItem(key: string) {
|
|
return store[key];
|
|
},
|
|
|
|
setItem(key: string, value: string) {
|
|
store[key] = value;
|
|
},
|
|
|
|
hasOwnProperty(key: string) {
|
|
return store.hasOwnProperty(key);
|
|
},
|
|
|
|
removeItem(key: string) {
|
|
delete store[key];
|
|
},
|
|
|
|
clear() {
|
|
store = {} as Storage;
|
|
},
|
|
};
|
|
});
|
|
|
|
export default mockLocalStorage;
|