add timesheet unit and e2e tests; add unit test CI setup

This commit is contained in:
Gregor Vostrak
2026-05-20 15:23:22 +02:00
parent da235dfdc8
commit 54fffd07bc
16 changed files with 4914 additions and 883 deletions

View File

@@ -0,0 +1,20 @@
// Vitest setup file. Wires up the globals that the production code reads
// off `window` (`getTimezoneSetting`, `getWeekStartSetting`, `getNumberFormat`,
// `getIntervalFormat`) so that helpers under test don't crash when imported
// outside the running app.
import { vi } from 'vitest';
declare global {
interface Window {
getTimezoneSetting: () => string;
getWeekStartSetting: () => string;
getNumberFormat: () => string;
getIntervalFormat: () => string;
}
}
window.getTimezoneSetting = vi.fn(() => 'UTC');
window.getWeekStartSetting = vi.fn(() => 'monday');
window.getNumberFormat = vi.fn(() => 'point');
window.getIntervalFormat = vi.fn(() => 'hours-minutes');