- Delete old Vite+Svelte frontend - Initialize new SvelteKit project with TypeScript - Configure Tailwind CSS v4 + DaisyUI - Implement JWT authentication with auto-refresh - Create login page with form validation (Zod) - Add protected route guards - Update Docker configuration for single-stage build - Add E2E tests with Playwright (6/11 passing) - Fix Svelte 5 reactivity with $state() runes Known issues: - 5 E2E tests failing (timing/async issues) - Token refresh implementation needs debugging - Validation error display timing
30 lines
778 B
TypeScript
30 lines
778 B
TypeScript
// @ts-ignore TS6133
|
||
import { expect, test } from "vitest";
|
||
|
||
import * as z from "zod/v3";
|
||
|
||
const RealSet = Set;
|
||
const RealMap = Map;
|
||
const RealDate = Date;
|
||
|
||
test("doesn’t throw when Date is undefined", () => {
|
||
delete (globalThis as any).Date;
|
||
const result = z.object({}).safeParse({});
|
||
expect(result.success).toEqual(true);
|
||
globalThis.Date = RealDate;
|
||
});
|
||
|
||
test("doesn’t throw when Set is undefined", () => {
|
||
delete (globalThis as any).Set;
|
||
const result = z.object({}).safeParse({});
|
||
expect(result.success).toEqual(true);
|
||
globalThis.Set = RealSet;
|
||
});
|
||
|
||
test("doesn’t throw when Map is undefined", () => {
|
||
delete (globalThis as any).Map;
|
||
const result = z.object({}).safeParse({});
|
||
expect(result.success).toEqual(true);
|
||
globalThis.Map = RealMap;
|
||
});
|