-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvitest.config.ts
46 lines (44 loc) · 1.15 KB
/
vitest.config.ts
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
import { defineConfig } from "vitest/config";
import react from "@vitejs/plugin-react";
import { resolve as pathResolve } from "node:path";
import svgr from "vite-plugin-svgr";
const resolve = (path: string) => pathResolve(__dirname, path);
export default defineConfig({
plugins: [
react(),
svgr({
svgrOptions: {
ref: true,
svgo: false,
titleProp: true,
},
include: "**/*.svg",
}),
],
test: {
globals: true,
environment: "jsdom",
include: ["src/**/**/*.test.{ts,tsx}"],
exclude: ["/.next"],
setupFiles: "./vitest.setup.ts",
deps: {
inline: ["vitest-canvas-mock"],
},
},
resolve: {
alias: {
"@": resolve("src"),
"@api": resolve("src/api"),
"@shared": resolve("src/shared"),
"@workbook": resolve("src/workbook"),
"@article": resolve("src/article"),
"@main": resolve("src/main"),
"@mocks": resolve("src/mocks"),
"@common": resolve("src/common"),
"@problem": resolve("src/problem"),
"@subscription": resolve("src/subscription"),
"@auth": resolve("src/auth"),
public: resolve("public"),
},
},
});