Add testing strategy: Vitest for unit tests, Playwright for E2E
- Vitest: unit tests for packages, components, and app logic (jsdom env, @testing-library/react, co-located test files) - Playwright: E2E browser tests per app (journal.test.ts, planner.test.ts), auto-starts dev servers, scoped via testMatch - Sample unit test for types package - Smoke E2E tests for both apps - Updated CLAUDE.md with test commands and strategy Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
4fac18c165
commit
40b9c425a0
11 changed files with 873 additions and 6 deletions
15
packages/types/src/index.test.ts
Normal file
15
packages/types/src/index.test.ts
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import { describe, it, expect } from "vitest";
|
||||
import type { Waypoint, Route } from "./index";
|
||||
|
||||
describe("types", () => {
|
||||
it("Waypoint type accepts valid data", () => {
|
||||
const waypoint: Waypoint = { lat: 52.52, lon: 13.405 };
|
||||
expect(waypoint.lat).toBe(52.52);
|
||||
expect(waypoint.lon).toBe(13.405);
|
||||
});
|
||||
|
||||
it("Waypoint supports isDayBreak flag", () => {
|
||||
const waypoint: Waypoint = { lat: 48.137, lon: 11.576, name: "Munich", isDayBreak: true };
|
||||
expect(waypoint.isDayBreak).toBe(true);
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue