-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.ts
More file actions
30 lines (27 loc) · 805 Bytes
/
Copy pathvitest.config.ts
File metadata and controls
30 lines (27 loc) · 805 Bytes
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
import path from "node:path";
import { fileURLToPath } from "node:url";
import react from "@vitejs/plugin-react";
import { defineConfig } from "vitest/config";
const __dirname = path.dirname(fileURLToPath(import.meta.url));
export default defineConfig({
plugins: [react()],
resolve: {
alias: [
{ find: "@/lib", replacement: path.resolve(__dirname, "src/lib") },
{
find: "@/modules",
replacement: path.resolve(__dirname, "src/modules"),
},
{ find: "@/", replacement: `${path.resolve(__dirname, ".")}/` },
{ find: "@", replacement: path.resolve(__dirname, ".") },
],
},
test: {
environment: "jsdom",
globals: true,
setupFiles: "./vitest.setup.ts",
coverage: {
reporter: ["text", "json-summary", "html"],
},
},
});