generated from mission-apprentissage/template-apprentissage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvitest.workspace.ts
50 lines (49 loc) · 1.04 KB
/
vitest.workspace.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
47
48
49
50
import path from "path";
import tsconfigPaths from "vite-tsconfig-paths";
import { defineWorkspace } from "vitest/config";
export default defineWorkspace([
{
plugins: [tsconfigPaths()],
test: {
name: "server",
root: "./server",
include: ["./tests/**/*.test.ts", "./src/**/*.test.ts"],
setupFiles: ["./tests/setup.ts"],
globalSetup: ["./server/tests/globalSetup.ts"],
clearMocks: true,
},
resolve: {
alias: {
"@": path.resolve(__dirname, "./server/src"),
},
},
},
{
plugins: [tsconfigPaths()],
test: {
name: "ui",
root: "./ui",
include: ["./**/*.test.ts"],
setupFiles: ["./tests/setup.ts"],
clearMocks: true,
},
},
{
plugins: [tsconfigPaths()],
test: {
name: "shared",
root: "./shared",
include: ["**/*.test.ts"],
clearMocks: true,
},
},
{
plugins: [tsconfigPaths()],
test: {
name: "sdk",
root: "./sdk",
include: ["**/*.test.ts"],
clearMocks: true,
},
},
]);