mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-22 16:23:50 +02:00
fix test
This commit is contained in:
@@ -49,6 +49,19 @@ Object.defineProperty(window, 'matchMedia', {
|
||||
}))
|
||||
});
|
||||
|
||||
// localStorage polyfill (jsdom may not provide a full implementation)
|
||||
if (typeof globalThis.localStorage === 'undefined' || typeof globalThis.localStorage.clear !== 'function') {
|
||||
const store = new Map();
|
||||
globalThis.localStorage = {
|
||||
getItem: (key) => store.get(key) ?? null,
|
||||
setItem: (key, value) => store.set(key, String(value)),
|
||||
removeItem: (key) => store.delete(key),
|
||||
clear: () => store.clear(),
|
||||
get length() { return store.size; },
|
||||
key: (index) => [...store.keys()][index] ?? null
|
||||
};
|
||||
}
|
||||
|
||||
// Notification API stub
|
||||
globalThis.Notification = class {
|
||||
static permission = 'denied';
|
||||
|
||||
Reference in New Issue
Block a user