-
Notifications
You must be signed in to change notification settings - Fork 4
/
vitest.config.mjs
48 lines (47 loc) · 1.18 KB
/
vitest.config.mjs
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
import react from "@vitejs/plugin-react";
import { defineConfig } from "vitest/config";
// import path from "path";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
// resolve: {
// alias: {
// "@design": path.resolve(__dirname, "./design"),
// "@icons": path.resolve(__dirname, "./icons"),
// },
// },
test: {
coverage: {
clean: true,
enabled: true,
exclude: ["**/*.test.tsx", "**/*.test.ts"],
// include: [
// "./src/components/**/*.{tsx,ts}",
// "./src/common/**/*.{tsx,ts}",
// "./src/effects/**/*.{ts,tsx}",
// ],
provider: "v8",
reporter: ["lcov", "clover", "cobertura"],
reportsDirectory: "./coverage",
threshold: {
branches: 80,
functions: 80,
lines: 80,
statements: 80,
},
},
environment: "jsdom",
globals: true,
include: [
"./src/components/**/*.test.tsx",
"./src/components/**/*.test.ts",
"./src/effects/**/*.test.{ts,tsx}",
],
maxThreads: 12,
minThreads: 5,
setupFiles: "./test-setup.ts",
silent: true,
threads: true,
update: true,
},
});