-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.perf.config.ts
More file actions
38 lines (32 loc) · 892 Bytes
/
vitest.perf.config.ts
File metadata and controls
38 lines (32 loc) · 892 Bytes
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
/**
* Vitest Performance Test Configuration
*
* Tier 3 tests: Benchmark.js microbenchmarks for performance regression detection.
* These tests measure operation latency with statistical rigor.
*
* Run with: npm run test:perf
*/
import { defineConfig } from "vitest/config";
export default defineConfig({
test: {
include: ["tests/performance/**/*.bench.ts"],
exclude: ["tests/unit/**", "tests/integration/**", "tests/e2e/**"],
// Performance tests need longer timeouts
testTimeout: 120_000,
hookTimeout: 60_000,
// Run serially for consistent measurements
pool: "forks",
poolOptions: {
forks: {
singleFork: true,
},
},
// Environment
environment: "node",
// Benchmark mode
benchmark: {
include: ["tests/performance/**/*.bench.ts"],
outputFile: "tests/performance/results.json",
},
},
});