-
Notifications
You must be signed in to change notification settings - Fork 342
Expand file tree
/
Copy pathvitest.config.ts
More file actions
32 lines (31 loc) · 1.86 KB
/
Copy pathvitest.config.ts
File metadata and controls
32 lines (31 loc) · 1.86 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
import { configDefaults, defineConfig } from 'vitest/config';
export default defineConfig({
test: {
testTimeout: 60_000,
// The e2e suites drive real deployments, so individual tests can lose
// timing races (queue delays, cold starts, watcher latency) that a
// second attempt absorbs. One CI retry keeps a single racy test from
// failing a 20+ minute matrix job; retried tests stay visible — the
// github-reporter annotates them and the PR comment lists them — so
// real races still get looked at. Harnesses where a failure is itself
// the signal (event-log-race-repro, benchmarks) pin `retry: 0` locally.
// Local runs keep retry at 0 so races reproduce while debugging.
retry: process.env.CI ? 1 : 0,
// How many concurrent tests vitest runs from a `describe.concurrent`
// suite (vitest's own default is 5). Only the e2e conformance suite is
// concurrent, so this is effectively its dial. Tunable because the right
// value is a property of the runner and the deployment rather than of
// the tests: every CLI assertion spawns a `node` child, and a CI runner
// has few cores, so too high a value inflates per-test latency until
// tests exceed budgets written for an unloaded suite. Each lane logs
// what it observed (see `summarizeLoad` in the e2e utils).
maxConcurrency: Number(process.env.WORKFLOW_E2E_MAX_CONCURRENCY ?? 5),
// Positional file arguments are regex filters, not paths, so
// `vitest run packages/core/e2e/x.test.ts` also matches
// `.claude/worktrees/<name>/packages/core/e2e/x.test.ts` when agent
// worktrees live inside the repo (see .gitignore). Those copies belong to
// other branches: they would run their own version of the suite against the
// same backend and overwrite the same result files.
exclude: [...configDefaults.exclude, '**/.claude/**'],
},
});