Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions docs/test-toolchain.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,21 @@ Run tests with `npm test` or `npx vitest run`. The repository config disables th
browser mode explicitly. It does not configure the public mockerPlugin/interceptorPlugin,
a Vitest UI or a browser-test dev server. Do not expose these test tools as a service.

A test gets 30 seconds unless it names its own budget. The number is a hang detector, not a
performance claim. On 27 September vitest's default of 5 s failed four tests that take 0.4 to 1.7 s
on an idle machine, while another session's build and tests held the load average at 8 on four
threads:

| Test | Idle | Loaded |
|---|---|---|
| `weather.test.ts`, an uncertain absent batch | 401 ms | over 5 s |
| `frozen-verification.live.test.ts`, the request captured before metadata calls | 784 ms | over 5 s |
| `frozen-verification.live.test.ts`, a target-only row | 1114 ms | over 5 s |
| `generation-migration.live.test.ts`, historical epochs from PostgreSQL | 1724 ms | over 5 s |

A bound a client depends on is asserted by its own test, as in `tests/failure.test.ts`, never by
this setting.

## Audit record, 15 September 2026

The previous Vitest 1.6 toolchain produced four npm audit findings: one critical, one high
Expand Down
6 changes: 6 additions & 0 deletions typescript/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,11 @@ export default defineConfig({
// The conformance runner reads files from ../conformance, which is outside this package. That is
// deliberate: the vectors are shared, so they cannot live inside any one language's tree.
root: '.',
// A hang detector, not a performance assertion: a hung test never finishes, so this number only
// decides how long it takes to say so. vitest's default of 5 s failed four tests on
// 27 September that take 0.4-1.7 s on an idle machine, while another session's build and tests
// held the load average at 8 on four threads. A test that names its own budget keeps it, and a
// bound a client depends on is asserted by its test (failure.test.ts), not by this setting.
testTimeout: 30_000,
},
})
Loading