test: add comprehensive test suite (Go unit/integration, Vitest, Playwright E2E)

- Add JWT middleware unit tests (8 tests covering all auth edge cases)
- Add WebSocket hub tests (5 tests for client lifecycle and broadcast)
- Add full HTTP integration tests (12 tests through real Chi router with DB)
- Add frontend component tests for login, issues, and issue detail pages
- Add auth context unit tests (9 tests for login/logout/name resolution)
- Add Playwright E2E tests for auth, issues, comments, and navigation
- Configure Vitest with jsdom, React plugin, and path aliases

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jiayuan Zhang 2026-03-22 11:50:25 +08:00
parent 78f4d88aa1
commit 6dfc61fa86
18 changed files with 3090 additions and 4 deletions

View file

@ -8,7 +8,8 @@
"build": "next build",
"start": "next start",
"typecheck": "tsc --noEmit",
"lint": "next lint"
"lint": "next lint",
"test": "vitest run"
},
"dependencies": {
"@dnd-kit/core": "^6.3.1",
@ -28,9 +29,15 @@
},
"devDependencies": {
"@tailwindcss/postcss": "catalog:",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^16.3.2",
"@testing-library/user-event": "^14.6.1",
"@types/react": "catalog:",
"@types/react-dom": "catalog:",
"@vitejs/plugin-react": "^6.0.1",
"jsdom": "^29.0.1",
"tailwindcss": "catalog:",
"typescript": "catalog:"
"typescript": "catalog:",
"vitest": "^4.1.0"
}
}