Files
TheLastGarden/vitest.config.ts
T
josh cde93883bd docs(01-06): author Season 7 end-state principle doctrine + Vitest doc-lint test (PIPE-05)
- .planning/season-7-end-state.md answers principle-level the three questions
  per CONTEXT D-08: (a) what rest state means, (b) what the finite Roothold
  ceiling is tied to (count of authored fragments + Seasons), (c) the coda's
  tonal register (warm/quiet/specific/final). Cites SEAS-04, SEAS-09, SEAS-10,
  STRY-08; ROADMAP Phase 7; PITFALLS #1.
- Includes the explicit 'What this document is NOT' boundary section so
  treatment-level scope creep is structurally rejected (binary-choice scene
  text, ending paragraph text, Lura's final line, credits screen — all
  authored Phase 7, not Phase 1).
- scripts/doctrine.test.ts is the only automated enforcement of both Phase-1
  doctrine docs (per CONTEXT D-07: no UX-string lint rule). Asserts file
  existence + required H2 sections + required source citations + boundary
  disclaimer. 8 assertions / 2 doc files.
- vitest.config.ts include glob extended to scripts/**/*.test.ts so
  doctrine.test.ts is discovered by 'npm test'.
- tsconfig.node.json include extended to scripts/**/*.ts so the strict-TS
  gate covers the new doc-lint test alongside the existing build configs.
- 'npm test' green: 2 test files, 9 tests passing (sentinel + doctrine).
- Per CONTEXT D-09: lives in .planning/, not docs/.

Rule 3 [Blocking]: vitest.config.ts and tsconfig.node.json include globs
extended to discover the new TypeScript test file (existing globs only
covered .mjs scripts and src/ tests).
2026-05-08 23:31:25 -04:00

19 lines
684 B
TypeScript

import { defineConfig } from 'vitest/config';
// Phase 1 test infrastructure config.
//
// `happy-dom` is the chosen DOM env because Plan 03's IndexedDB tests will
// use happy-dom together with `fake-indexeddb/auto` (happy-dom does not ship
// IndexedDB). RESEARCH § Validation Architecture explicitly calls for this.
//
// `passWithNoTests: false` enforces RESEARCH CI Pitfall B — a green CI run
// must mean tests *ran*, not "no tests existed".
export default defineConfig({
test: {
environment: 'happy-dom',
include: ['src/**/*.test.ts', 'src/**/*.test.tsx', 'scripts/**/*.test.mjs', 'scripts/**/*.test.ts'],
passWithNoTests: false,
globals: false,
},
});