test: setup Vitest workspace and Playwright with first nutrition tests
Vitest: - Workspace at root (vitest.workspace.ts) running per-package configs - packages/shared/vitest.config.ts with v8 coverage and 70% thresholds - Root scripts: test / test:watch / test:coverage Nutrition module in @ketopath/shared: - calculateBmr (Mifflin-St Jeor) + calculateTdee with activity multipliers - ACTIVITY_MULTIPLIERS constants matching CLAUDE.md domain knowledge - 14 unit tests covering Michele/Laura PRD personas, all sex variants, every activity level, and input validation (100% coverage on src/nutrition) Playwright in apps/web: - chromium-only project, webServer auto-boot of pnpm dev - e2e/home.spec.ts smoke test asserts Italian copy and disclaimer Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
ff004cdf8d
commit
a3109d2a6c
16 files changed
+194
-6
No files matched your search
+6
-2
@@ -19,7 +19,9 @@
|
||||
"format": "prettier --write .",
|
||||
"format:check": "prettier --check .",
|
||||
"typecheck": "tsc -b",
|
||||
"test": "pnpm --filter \"./packages/*\" --filter \"./apps/*\" -r --if-present test",
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest",
|
||||
"test:coverage": "vitest run --coverage",
|
||||
"test:e2e": "pnpm --filter @ketopath/web test:e2e",
|
||||
"db:generate": "pnpm --filter @ketopath/db db:generate",
|
||||
"db:migrate": "pnpm --filter @ketopath/db db:migrate",
|
||||
@@ -40,7 +42,9 @@
|
||||
"lint-staged": "^15.2.2",
|
||||
"prettier": "^3.2.5",
|
||||
"prettier-plugin-tailwindcss": "^0.5.14",
|
||||
"typescript": "5.4.5"
|
||||
"typescript": "5.4.5",
|
||||
"vitest": "^1.6.0",
|
||||
"@vitest/coverage-v8": "^1.6.0"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{ts,tsx,js,jsx,cjs,mjs}": [
|
||||
|
||||
Reference in new issue
Block a user