-
-
Notifications
You must be signed in to change notification settings - Fork 80
Expand file tree
/
Copy pathvitest.config.mts
More file actions
45 lines (43 loc) · 1.61 KB
/
Copy pathvitest.config.mts
File metadata and controls
45 lines (43 loc) · 1.61 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
import react from "@vitejs/plugin-react";
import path from "path";
import { fileURLToPath } from "url";
import { defineConfig } from "vitest/config";
// eslint-disable-next-line @typescript-eslint/naming-convention
const __dirname = path.dirname(fileURLToPath(import.meta.url));
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
"@assets": path.resolve(__dirname, "./src/assets"),
"@components": path.resolve(__dirname, "./src/components"),
"@containers": path.resolve(__dirname, "./src/containers"),
"@contexts": path.resolve(__dirname, "./src/contexts"),
"@data": path.resolve(__dirname, "./src/data"),
"@hooks": path.resolve(__dirname, "./src/hooks"),
"@layout": path.resolve(__dirname, "./src/layouts"),
"@ui": path.resolve(__dirname, "./src/components/ui"),
"@utils": path.resolve(__dirname, "./src/utils"),
"@widgets": path.resolve(__dirname, "./src/components/widgets"),
"@fonts": path.resolve(__dirname, "./src/public/fonts"),
"@": path.resolve(__dirname, "./src"),
},
},
css: {
postcss: {},
},
test: {
globals: true,
environment: "happy-dom",
clearMocks: true,
setupFiles: ["./vitest.setup.ts"],
include: [
"__tests__/**/*.{test,tests}.{ts,tsx}",
"src/**/__tests__/**/*.{test,tests}.{ts,tsx}",
],
exclude: ["node_modules", "tests/**"],
coverage: {
provider: "v8",
reportsDirectory: "coverage",
},
},
});