A try of overhauling the frontend tests, bailed after 24h+

This commit is contained in:
2026-06-11 09:09:02 +02:00
parent a9e1e96622
commit bb58389675
33 changed files with 3257 additions and 275 deletions
+21 -1
View File
@@ -1 +1,21 @@
import '@testing-library/jest-dom/vitest';
import '@testing-library/jest-dom';
import { vi, beforeAll } from 'vitest';
// Mock localStorage
const localStorageMock = (() => {
let store: Record<string, string> = {};
return {
getItem: (key: string) => store[key] || null,
setItem: (key: string, value: string) => { store[key] = value.toString(); },
removeItem: (key: string) => { delete store[key]; },
clear: () => { store = {}; },
};
})();
Object.defineProperty(window, 'localStorage', {
value: localStorageMock,
});
beforeAll(() => {
vi.clearAllMocks();
});