7b2982b839
- vitest.config.ts: happy-dom environment (so Plan 03's IndexedDB tests can layer fake-indexeddb on top of happy-dom's window per RESEARCH); passWithNoTests:false enforces RESEARCH CI Pitfall B (a green CI run must mean tests *ran*, not 'no tests existed'); include glob covers src/**/*.test.ts(x) and scripts/**/*.test.mjs. - playwright.config.ts: testDir 'tests/e2e' (not yet created — first spec lands in Phase 2 PIPE-07); webServer config wires npm run dev so smoke tests can self-start the dev server; baseURL pinned to vite default. - src/__sentinel__.test.ts: a single test asserting 1+1===2 AND that globalThis.window exists, proving the runner is wired and happy-dom is active. To be deleted once real tests exist (Plan 03 onward). - npm test → 1 file, 1 test passed in 593ms. - npx playwright --version → Version 1.59.1 (matches RESEARCH lock).
19 lines
660 B
TypeScript
19 lines
660 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'],
|
|
passWithNoTests: false,
|
|
globals: false,
|
|
},
|
|
});
|