-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvitest.config.js
More file actions
57 lines (55 loc) · 1.75 KB
/
vitest.config.js
File metadata and controls
57 lines (55 loc) · 1.75 KB
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
import { defineConfig } from "vitest/config";
import react from "@vitejs/plugin-react";
import path from "path";
import { fileURLToPath } from "url";
import { dirname } from "path";
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
"@components": path.resolve(__dirname, "./src/components"),
"@features": path.resolve(__dirname, "./src/features"),
"@hooks": path.resolve(__dirname, "./src/hooks"),
"@lib": path.resolve(__dirname, "./src/lib"),
"@services": path.resolve(__dirname, "./src/services"),
"@store": path.resolve(__dirname, "./src/store"),
"@styles": path.resolve(__dirname, "./src/styles"),
"@types": path.resolve(__dirname, "./src/types"),
"@utils": path.resolve(__dirname, "./src/utils"),
"@contracts": path.resolve(__dirname, "./src/contracts"),
},
},
test: {
environment: "jsdom",
setupFiles: ["./tests/setup.js"],
globals: true,
include: [
"tests/**/*.test.{js,jsx,ts,tsx}",
"src/**/*.{test,spec}.{js,jsx,ts,tsx}",
],
exclude: [
"node_modules/**",
"dist/**",
"contracts/**",
"contracts/**/*",
"contracts/lib/**",
"tests/backend/**",
"tests/api/**",
"tests/hooks/useRaffleTracker.test.jsx",
"tests/components/mobile/BuySellSheet.inputAndSeasonGuard.test.jsx", // OOM: heavy web3 dep tree
"tests/e2e/**", // E2E tests use Playwright, not Vitest
],
poolOptions: {
forks: {
execArgv: ["--max-old-space-size=4096"],
},
},
coverage: {
provider: "v8",
reporter: ["text", "json", "html"],
},
},
});