Add unit testing infrastructure with Vitest
Set up Vitest for both server (Node + Supertest) and client (jsdom + React Testing Library). Extract Express app into app.js for testability. Add example tests covering bills validation, bills route CRUD, ThemeContext, and App nav rendering. Update CLAUDE.md with testing docs and requirement to write tests with features. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,9 @@
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview"
|
||||
"preview": "vite preview",
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest"
|
||||
},
|
||||
"dependencies": {
|
||||
"react": "^18.3.1",
|
||||
@@ -13,7 +15,12 @@
|
||||
"recharts": "^3.8.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@testing-library/jest-dom": "^6.9.1",
|
||||
"@testing-library/react": "^16.3.2",
|
||||
"@testing-library/user-event": "^14.6.1",
|
||||
"@vitejs/plugin-react": "^4.3.0",
|
||||
"vite": "^5.2.11"
|
||||
"jsdom": "^29.0.0",
|
||||
"vite": "^5.2.11",
|
||||
"vitest": "^4.1.0"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user