-
Notifications
You must be signed in to change notification settings - Fork 155
Expand file tree
/
Copy pathvitest.config.ts
More file actions
53 lines (52 loc) · 1.06 KB
/
vitest.config.ts
File metadata and controls
53 lines (52 loc) · 1.06 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
import path from "node:path";
import { defineConfig } from "vitest/config";
export default defineConfig({
resolve: {
alias: {
"~": path.resolve(import.meta.dirname, "app"),
},
},
test: {
server: {
deps: {
inline: ["zod"],
},
},
projects: [
{
extends: true,
test: {
name: "server",
environment: "node",
include: ["app/**/*.test.ts", "app/**/*.test.tsx", "app/**/*.spec.ts", "app/**/*.spec.tsx"],
exclude: [
"app/client/**/*.test.ts",
"app/client/**/*.test.tsx",
"app/client/**/*.spec.ts",
"app/client/**/*.spec.tsx",
],
setupFiles: ["./app/test/setup.ts"],
},
},
{
extends: true,
test: {
name: "client",
environment: "happy-dom",
environmentOptions: {
happyDOM: {
url: "http://localhost:3000",
},
},
include: [
"app/client/**/*.test.ts",
"app/client/**/*.test.tsx",
"app/client/**/*.spec.ts",
"app/client/**/*.spec.tsx",
],
setupFiles: ["./app/test/setup-client.ts"],
},
},
],
},
});