-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
vitest.shared.config.mts
54 lines (52 loc) · 1.24 KB
/
vitest.shared.config.mts
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
import codspeedPlugin from "@codspeed/vitest-plugin";
import { loadEnv } from "vite";
import json5Plugin from "vite-plugin-json5";
import plainText from "vite-plugin-plain-text";
import { defineConfig } from "vitest/config";
const mode = process.env.NODE_ENV || "test";
export default defineConfig({
plugins: [
json5Plugin(),
plainText("**/*.hbs", {
namedExport: false,
}),
codspeedPlugin(),
],
esbuild: { target: "es2022" },
test: {
globalSetup: ["vitest.global-setup.ts"],
coverage: {
enabled: true,
provider: "istanbul",
reporter: ["json", "text", "html"],
include: ["packages", "internal", "apps"],
exclude: [
"**/*.js",
"**/node_modules/**",
"**/dist/**",
"**/test/**",
"**/*.test.ts",
"**/*.d.ts",
"**/bin.ts",
"packages/fuel-gauge/**",
"apps/demo-*",
"apps/docs",
],
},
exclude: [
"**/node_modules/**",
"**/dist/**",
"/apps/demo-nextjs",
"/apps/demo-react-cra",
"/apps/demo-react-vite",
],
globals: true,
env: loadEnv(mode, process.cwd(), ""),
poolOptions: {
threads: {
minThreads: 1,
maxThreads: 16,
},
},
},
});