-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathvitest.config.ts
More file actions
39 lines (37 loc) · 1.95 KB
/
Copy pathvitest.config.ts
File metadata and controls
39 lines (37 loc) · 1.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
// A late console.* must not redden a green suite (#10374): vitest's worker
// forwards console output over RPC and discards the promise, and a write
// landing after teardown's rpcDone() snapshot is rejected into an unhandled
// error — a fully green run that exits 1. Disarming removes the mechanism.
// Mechanism + measured costs: examples/app-showcase/vitest.config.ts.
// Enforced repo-wide by scripts/check-console-intercept-disarm.mjs.
disableConsoleIntercept: true,
globals: true,
environment: 'node',
include: ['src/**/*.test.ts', 'scripts/**/*.test.ts'],
// The 17 export-surface pins that used to load the TypeScript compiler and
// type-resolve the whole export surface inside a test case no longer do:
// #4796 lifted that resolution into the `export-origins/` build-time
// baseline and the pins now compare against it. This value is what remains
// of the two stop-the-bleed laps (#4850 → 60s, #4864 → 30s) that kept those
// cases off vitest's 5000ms default while they still compiled.
//
// Keep it. Two `createProgram` cases survive deliberately —
// `data/driver.test.ts` and `ui/app.test.ts` assert TYPE WRITABILITY of
// retired keys, which is a different fact from export origin and which no
// export-surface baseline can carry — and the headroom is what stops them
// riding the same timeout line the export-surface family used to. The value
// itself is left exactly where the stop-bleed put it — lowering it is a
// separate decision, with its own measurement, and not this change's to make.
testTimeout: 60_000,
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html'],
include: ['src/**/*.zod.ts'],
exclude: ['node_modules', 'dist', 'scripts'],
},
},
});