Repository navigation
Expand file tree
/
Copy pathvitest.config.ts
More file actions
58 lines (57 loc) · 1.6 KB
/
Copy pathvitest.config.ts
File metadata and controls
58 lines (57 loc) · 1.6 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
import { defineConfig } from "vitest/config";
import react from "@vitejs/plugin-react";
import path from "path";
export default defineConfig({
plugins: [react()],
test: {
globals: true,
environment: "jsdom",
setupFiles: [],
include: ["src/**/*.test.ts", "src/**/*.test.tsx"],
coverage: {
provider: "v8",
reporter: ["text", "json", "html"],
include: ["src/utils/**"],
exclude: [
"node_modules/",
"src/**/*.test.ts",
"src/**/*.test.tsx",
// API clients — they make real HTTP calls; covered by integration tests, not unit tests.
"src/utils/googleCalendar.ts",
"src/utils/directorySearch.ts",
// Legacy / deprecated utilities
"src/utils/templateEngine.ts",
"src/utils/csvParser.ts",
],
thresholds: {
"src/utils/templateUtils.ts": {
statements: 100,
branches: 100,
functions: 100,
lines: 100,
},
"src/utils/campaignUtils.ts": {
statements: 100,
branches: 100,
functions: 100,
lines: 100,
},
"src/utils/templateToCalendarEvent.ts": {
statements: 100,
branches: 100,
functions: 100,
lines: 100,
},
},
},
},
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
"@components": path.resolve(__dirname, "./src/components"),
"@utils": path.resolve(__dirname, "./src/utils"),
"@hooks": path.resolve(__dirname, "./src/hooks"),
"@styles": path.resolve(__dirname, "./src/styles"),
},
},
});