# 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()`