From 35989f81206d9579c42c26fe8a88fecf28c30b93 Mon Sep 17 00:00:00 2001 From: Jean-Luc Makiola Date: Fri, 3 Apr 2026 17:42:01 +0200 Subject: [PATCH] docs: update CLAUDE.md with branching workflow, E2E testing commands Co-Authored-By: Claude Opus 4.6 (1M context) --- CLAUDE.md | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index d2179aa..d60b740 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -19,8 +19,10 @@ bun run db:generate # Generate Drizzle migration from schema changes bun run db:push # Apply migrations to gearbox.db # Testing -bun test # Run all tests +bun test # Run all unit/integration tests bun test tests/services/item.service.test.ts # Run single test file +bun run test:e2e # Run Playwright E2E tests +bun run test:e2e:ui # Playwright UI mode for debugging # Lint & Format bun run lint # Biome check (tabs, double quotes, organized imports) @@ -55,9 +57,16 @@ bun run build # Vite build → dist/client/ - **Timestamps**: stored as integers (unix epoch) with `{ mode: "timestamp" }`. - Tables: `categories`, `items`, `threads`, `threadCandidates`, `setups`, `setupItems`, `settings`, `users`, `sessions`, `apiKeys`. -### Testing (`tests/`) -- Bun test runner. Tests at service level and route level. -- `tests/helpers/db.ts`: `createTestDb()` creates in-memory SQLite with full schema and seeds an "Uncategorized" category. When adding schema columns, update both `src/db/schema.ts` and the test helper's CREATE TABLE statements. +### Testing (`tests/` and `e2e/`) +- **Unit/integration**: Bun test runner (`bun test`). Tests at service level and route level. +- `tests/helpers/db.ts`: `createTestDb()` creates in-memory SQLite via Drizzle migrations and seeds an "Uncategorized" category. +- **E2E**: Playwright (`bun run test:e2e`). Tests in `e2e/` run against a seeded SQLite database with the server in production mode. Seed script: `e2e/seed.ts`. + +## Branching + +- **Develop** is the main branch. Keep it clean — don't commit large feature work directly. +- For each new brainstorming/implementation session, create a feature branch off Develop (e.g., `feature/setup-impact-preview`, `fix/error-handling`). +- Merge back to Develop via PR or fast-forward merge when the work is complete and verified. ## Path Alias