-
Notifications
You must be signed in to change notification settings - Fork 0
/
vitest.config.ts
61 lines (60 loc) · 1.66 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/// <reference types="vitest" />
import { defineConfig } from "vitest/config";
import react from "@vitejs/plugin-react-swc";
import tsconfigPaths from "vite-tsconfig-paths";
import path from "path";
export default defineConfig({
plugins: [tsconfigPaths(), react()],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
test: {
globals: true,
environment: "jsdom",
setupFiles: "./vitest.setup.ts",
env: {
VITE_BASE_API_URL: "https://mock.codegate.ai",
},
exclude: [
"**/node_modules/**",
"**/dist/**",
"**/.{idea,git,cache,output,temp}/**",
"**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*",
],
css: false,
coverage: {
include: ["src/**/*.{js,jsx}", "src/**/*.{ts,tsx}"],
exclude: [
"coverage/**",
"dist/**",
"**/[.]**",
"**/*.d.ts",
"**/virtual:*",
"**/__x00__*",
"**/\x00*",
"public/**",
"test?(s)/**",
"test?(-*).?(c|m)[jt]s?(x)",
"**/*{.,-}{test,spec}?(-d).?(c|m)[jt]s?(x)",
"**/__tests__/**",
"**/test-utils.tsx",
"**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*",
"**/vitest.{workspace,projects}.[jt]s?(on)",
"**/.{eslint,mocha,prettier}rc.{?(c|m)js,yml}",
"src/**/*stories.tsx",
"src/types/**/*.{ts,tsx}",
],
thresholds: {
branches: 50,
functions: 70,
lines: 70,
statements: 70,
},
enabled: false,
provider: "istanbul",
reporter: ["text", "json", "html", "json-summary", "lcov"],
},
},
});