-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.ts
More file actions
36 lines (33 loc) · 929 Bytes
/
Copy pathvitest.config.ts
File metadata and controls
36 lines (33 loc) · 929 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
import { fileURLToPath } from "node:url";
import { mergeConfig } from "vite";
import { defineConfig } from "vitest/config";
import viteConfig from "./vite.config";
export default defineConfig(env =>
mergeConfig(viteConfig(env), {
test: {
globals: true,
environment: "jsdom",
setupFiles: ["vitest.setup.ts"],
root: fileURLToPath(new URL("./", import.meta.url)),
dir: "src",
reporters: ["default", "html"],
outputFile: {
html: "./test-results/unit/html/index.html",
},
coverage: {
all: false,
include: [
"src/components/**",
"src/utils/**",
"src/helpers/**",
"src/hooks/**",
// Exclude
"!src/components/loaders/**",
"!src/components/Spinner/**",
],
reporter: ["text", "json-summary"],
reportsDirectory: "./test-results/unit",
},
},
})
);