docs: split CLAUDE.md into focused reference files

Move architecture, testing, and dev tools detail into docs/ and
reference them via @path pointers to keep CLAUDE.md slim.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-24 15:46:18 +08:00
parent eb77aca715
commit a0ca6be8e1
4 changed files with 81 additions and 72 deletions

6
docs/TESTING.md Normal file
View File

@@ -0,0 +1,6 @@
# Testing
- **Unit:** env, DB connection, bcrypt — in `tests/unit/`
- **Integration:** `createApp().handle(new Request(...))` — no running server needed, use these for mutations
- **E2E:** Lightpanda browser via CDP (`ws://127.0.0.1:9222`). App URLs use `host.docker.internal` from inside Docker. Lightpanda executes JS but POST fetch returns 407 — use integration tests for anything that writes data.
- **Helpers:** `tests/helpers.ts``createTestApp()`, `seedTestUser()`, `createTestSession()`, `cleanupTestData()`