-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvitest.config.mts
41 lines (39 loc) · 1017 Bytes
/
vitest.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
import { config } from "dotenv";
import tsConfigPaths from "vite-tsconfig-paths";
import { defineConfig } from "vitest/config";
import react from "@vitejs/plugin-react-swc";
export default defineConfig({
plugins: [react() as any, tsConfigPaths()],
test: {
globals: true,
coverage: {
provider: "v8",
include: ["**/*.test.+(ts|tsx|js)"],
exclude: ["**/*.js", "**/*.mjs", "**/*.cjs"],
reporter: ["text", "json-summary"],
},
environment: "happy-dom",
setupFiles: ["./vitest.setup.tsx"],
include: ["**/*.test.+(ts|tsx|js)"],
reporters: ["default", "json", "github-actions"],
outputFile: "testResults.json",
poolOptions: {
threads: {
singleThread: true,
},
forks: {
singleFork: true,
},
},
maxConcurrency: 1,
env: {
...config({ path: process.env.CI ? "./.env" : "./.env.local" }).parsed,
},
},
resolve: {
alias: {
"@repo/*": "./packages/*",
"~/*": "./src/*",
},
},
});