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>
25 lines
623 B
TypeScript
25 lines
623 B
TypeScript
import { defineConfig, devices } from '@playwright/test';
|
|
|
|
const PORT = 3000;
|
|
const baseURL = `http://localhost:${PORT}`;
|
|
|
|
export default defineConfig({
|
|
testDir: './e2e',
|
|
fullyParallel: true,
|
|
forbidOnly: Boolean(process.env.CI),
|
|
retries: process.env.CI ? 2 : 0,
|
|
workers: process.env.CI ? 1 : undefined,
|
|
reporter: process.env.CI ? 'github' : 'list',
|
|
use: {
|
|
baseURL,
|
|
trace: 'on-first-retry',
|
|
},
|
|
projects: [{ name: 'chromium', use: { ...devices['Desktop Chrome'] } }],
|
|
webServer: {
|
|
command: 'pnpm dev',
|
|
url: baseURL,
|
|
reuseExistingServer: !process.env.CI,
|
|
timeout: 120_000,
|
|
},
|
|
});
|