-
Notifications
You must be signed in to change notification settings - Fork 1
/
vitest.config.ts
38 lines (37 loc) · 942 Bytes
/
vitest.config.ts
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
/// <reference types="vitest" />
import { defineConfig } from "vitest/config";
import path from "path";
import react from "@vitejs/plugin-react";
export default defineConfig({
plugins: [react()],
test: {
globals: true,
setupFiles: "helpers/setupTests.ts",
environment: "jsdom",
coverage: {
// files to include in metrics for coverage
// add your folders, adjust based on yor structure
include: [
"app/**/*.{ts,tsx}",
"components/**/*.{ts,tsx}",
"services/**/*.{ts,tsx}",
"utils/**/*.{ts,tsx}",
],
// if you want to exclude some files
exclude: [],
reporter: ["html", "text-summary"],
thresholds: {
functions: 20,
lines: 20,
branches: 20,
statements: 20,
},
},
},
resolve: {
alias: {
// add this section if you are using an alias
"@": path.resolve(__dirname, "."),
},
},
});