diff --git a/.claude/skills/qa/SKILL.md b/.claude/skills/qa/SKILL.md index ba54d16..679770f 100644 --- a/.claude/skills/qa/SKILL.md +++ b/.claude/skills/qa/SKILL.md @@ -65,7 +65,7 @@ npm run test:e2e # Playwright: E2E tests from previous QA runs Note any failures — these are regressions and must be treated as High bugs. ### 6. Write Unit Tests -Before E2E tests, identify and test isolated logic with Vitest in `src/__tests__/PROJ-X-*.test.ts`: +Before E2E tests, identify and test isolated logic with Vitest. Place tests **co-located** next to the source file (e.g. `src/hooks/useFeature.test.ts` next to `src/hooks/useFeature.ts`): **What to unit test (evaluate each):** - Custom hooks with non-trivial logic (e.g. `useKanbanStorage`: localStorage read/write, error fallback) diff --git a/CLAUDE.md b/CLAUDE.md index a241491..ceb6c68 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -47,14 +47,18 @@ All features tracked in `features/INDEX.md`. Every skill reads it at start and u - **Single Responsibility:** One feature per spec file - **shadcn/ui first:** NEVER create custom versions of installed shadcn components - **Human-in-the-loop:** All workflows have user approval checkpoints +- **Tests:** Unit tests co-located next to source files (`useHook.test.ts` next to `useHook.ts`). E2E tests in `tests/`. ## Build & Test Commands ```bash -npm run dev # Development server (localhost:3000) -npm run build # Production build -npm run lint # ESLint -npm run start # Production server +npm run dev # Development server (localhost:3000) +npm run build # Production build +npm run lint # ESLint +npm run start # Production server +npm test # Vitest unit/integration tests +npm run test:e2e # Playwright E2E tests +npm run test:all # Both test suites ``` ## Product Context