-
Notifications
You must be signed in to change notification settings - Fork 2
/
vitest.config.ts
36 lines (35 loc) · 938 Bytes
/
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
import { defineConfig } from "vitest/config";
import react from "@vitejs/plugin-react";
import path from "path";
export default defineConfig({
plugins: [react()],
resolve: {
alias: [
{
find: "containers",
replacement: path.resolve(__dirname, "src/containers"),
},
{
find: "components",
replacement: path.resolve(__dirname, "src/components"),
},
{
find: "utils",
replacement: path.resolve(__dirname, "src/utils"),
},
{
find: "styles",
replacement: path.resolve(__dirname, "src/styles"),
},
],
},
test: {
/* for example, use global to avoid globals imports (describe, test, expect): */
globals: true,
environment: "jsdom",
setupFiles: "./src/mocks/setup.ts",
// you might want to disable it, if you don't have tests that rely on CSS
// since parsing CSS is slow
css: false,
},
});