fix(state): prefs test localStorage mock typing

This commit is contained in:
ginnoir
2026-06-11 18:54:07 -05:00
parent f29b05bd70
commit 8d83f9899b
+3 -3
View File
@@ -3,13 +3,13 @@ import { getPrefs, setPrefs } from '../prefs';
describe('prefs', () => {
beforeEach(() => {
const store: Record<string, string> = {};
vi.stubGlobal('localStorage', {
store: {} as Record<string, string>,
getItem(key: string) {
return this.store[key] ?? null;
return store[key] ?? null;
},
setItem(key: string, value: string) {
this.store[key] = value;
store[key] = value;
},
});
});