forked from Poisonite/MakeMKV-Auto-Rip
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.js
More file actions
89 lines (77 loc) · 2.13 KB
/
vitest.config.js
File metadata and controls
89 lines (77 loc) · 2.13 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
import { defineConfig } from "vitest/config";
export default defineConfig({
test: {
// Global test settings
globals: true,
environment: "node",
// Test file patterns
include: [
"tests/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}",
"src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}",
],
exclude: [
"**/node_modules/**",
"**/dist/**",
"**/.{idea,git,cache,output,temp}/**",
"**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*",
],
// Coverage settings
coverage: {
provider: "v8",
reporter: ["text", "json", "html", "lcov"],
reportsDirectory: "./coverage",
exclude: [
"coverage/**",
"dist/**",
"packages/*/test{,s}/**",
"**/*.d.ts",
"cypress/**",
"test{,s}/**",
"test{,-*}.{js,cjs,mjs,ts,tsx,jsx}",
"**/*{.,-}test.{js,cjs,mjs,ts,tsx,jsx}",
"**/*{.,-}spec.{js,cjs,mjs,ts,tsx,jsx}",
"**/__tests__/**",
"**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*",
"**/.{eslint,mocha,prettier}rc.{js,cjs,yml}",
"**/node_modules/**",
"vitest.config.js",
],
include: ["src/**/*.{js,jsx,ts,tsx}", "index.js"],
all: true,
lines: 80,
functions: 80,
branches: 80,
statements: 80,
},
// Test timeout settings
testTimeout: 20000, // Increased for integration tests
hookTimeout: 15000,
// Reporting
reporter: ["verbose", "json", "html"],
outputFile: {
json: "./test-results/results.json",
html: "./test-results/results.html",
},
// Watch mode settings
watch: false,
// Parallel execution settings
threads: true,
maxThreads: 4,
minThreads: 1,
// Setup files
setupFiles: ["./tests/setup.js"],
// Environment variables for testing
env: {
NODE_ENV: "test",
},
// Mock settings
clearMocks: true,
restoreMocks: true,
// Retry settings for flaky tests
retry: 2,
},
// Esbuild settings for fast transpilation
esbuild: {
target: "node22",
},
});