forked from FuelLabs/fuels-ts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vitest.shared.config.mts
52 lines (50 loc) · 1.15 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
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,
}),
],
esbuild: { target: "es2022" },
test: {
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,
setupFiles: ["./vitest.env.ts"],
env: loadEnv(mode, process.cwd(), ""),
poolOptions: {
threads: {
minThreads: 1,
maxThreads: 16,
},
},
},
});