-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathvite.config.js
40 lines (39 loc) · 931 Bytes
/
vite.config.js
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
import { defineConfig } from "vite";
import { coverageConfigDefaults } from "vitest/config";
import react from "@vitejs/plugin-react-swc";
/// <reference types="vitest" />
export default defineConfig({
plugins: [react()],
test: {
environment: "jsdom",
setupFiles: ["./vitest-setup-tests.js"],
include: ["tests/**/*.spec.ts?(x)"],
poolOptions: {
vmThreads: {
memoryLimit: "1 MB",
},
},
coverage: {
provider: "v8",
reporter: [
["lcov", { projectRoot: "./src" }],
["json", { file: "coverage.json" }],
"text",
],
thresholds: {
lines: 100,
functions: 100,
branches: 100,
statements: 100,
},
exclude: [
"archive",
"tests",
"**/types.ts",
"**/*.d.ts",
"src/csr/idle-callback-polyfill.js",
...coverageConfigDefaults.exclude,
],
},
},
});