-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.ts
More file actions
49 lines (42 loc) · 1.06 KB
/
vitest.config.ts
File metadata and controls
49 lines (42 loc) · 1.06 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
40
41
42
43
44
45
46
47
48
49
import { defineConfig } from "vitest/config";
/**
* Vitest configuration for Tier 1 unit tests.
*
* Fast tests (<5s total) that don't require:
* - Docker/containers
* - Network connections
* - Supabase
*
* Covers:
* - Zod schema validation
* - Pure function logic (cache keys, tier detection)
* - Golden regression tests
*/
export default defineConfig({
test: {
// Include only unit tests
include: ["tests/unit/**/*.test.ts"],
// Exclude integration/performance/e2e tests
exclude: [
"tests/integration/**",
"tests/performance/**",
"tests/e2e/**",
"node_modules/**",
],
// Fast timeout for unit tests
testTimeout: 5000,
// Run tests in parallel
pool: "threads",
// Coverage configuration
coverage: {
provider: "v8",
include: ["src/schemas/**/*.ts", "src/services/tier.ts", "src/services/cache.ts"],
exclude: ["**/*.test.ts", "**/*.d.ts"],
},
// Environment
environment: "node",
// Clear mocks between tests
clearMocks: true,
restoreMocks: true,
},
});