Files
loki/scripts
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
..