Files
loki/package.json
T
g-but b775d185e8 feat(home): npm run test:home runs all eight self-test suites in one shot
Each home/ module ships an inline test suite (state/decide/projects/
render/emit/log/watcher/worker — 76 tests total as of 00058f9), but
running them required eight separate npx tsx invocations. Added
scripts/test-home.sh that chains them in a stable order, captures
each suite's output, parses the N/M passed footer, and aggregates a
total at the end. Wired as 'npm run test:home' alongside the existing
smoke and check:design scripts.

The footer regex matches '^N/M' rather than 'N/M passed' specifically
because render.ts prints '12/12 intents render' — most suites use
'passed' but the loose anchor catches both shapes. Exits non-zero on
the first suite that fails (set -euo pipefail + a tracked total_fail
counter for the summary line).

Output of npm run test:home ends with:
  ✓ 76 total tests passed across 8 home/ self-test suites

No code change in home/. tsc unaffected.
2026-05-20 06:43:28 +02:00

59 lines
1.6 KiB
JSON

{
"name": "cockpit",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"postbuild": "bash scripts/deploy-local.sh",
"start": "next start",
"install-app": "bash scripts/install-cockpit-app.sh",
"migrate": "drizzle-kit push",
"lint": "eslint",
"check:design": "bash scripts/check-design-system.sh",
"smoke": "bash scripts/smoke.sh",
"test:home": "bash scripts/test-home.sh",
"prepare": "husky"
},
"dependencies": {
"@auth/drizzle-adapter": "^1.11.2",
"@base-ui/react": "^1.3.0",
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/sortable": "^10.0.0",
"@dnd-kit/utilities": "^3.2.2",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"date-fns": "^4.1.0",
"drizzle-orm": "^0.45.2",
"lucide-react": "^1.7.0",
"mermaid": "^11.14.0",
"next": "16.2.4",
"next-auth": "^5.0.0-beta.31",
"next-themes": "^0.4.6",
"postgres": "^3.4.8",
"react": "19.2.4",
"react-dom": "19.2.4",
"resend": "^6.12.3",
"shadcn": "^4.1.2",
"stripe": "^22.1.1",
"tailwind-merge": "^3.5.0",
"tw-animate-css": "^1.4.0",
"zod": "^4.3.6"
},
"devDependencies": {
"@tailwindcss/postcss": "^4",
"@types/better-sqlite3": "^7.6.13",
"@types/node": "^20",
"@types/react": "^19",
"@types/react-dom": "^19",
"better-sqlite3": "^12.8.0",
"drizzle-kit": "^0.31.10",
"eslint": "^9",
"eslint-config-next": "16.2.4",
"husky": "^9.1.7",
"tailwindcss": "^4",
"tsx": "^4.21.0",
"typescript": "^5"
}
}