-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathvitest.workspace.ts
42 lines (40 loc) · 961 Bytes
/
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
import path from "path";
import tsconfigPaths from "vite-tsconfig-paths";
import { defineWorkspace } from "vitest/config"; // eslint-disable-line import/no-unresolved
export default defineWorkspace([
{
plugins: [tsconfigPaths()],
test: {
name: "server",
root: "./server",
include: ["./tests/**/*.test.ts", "./src/**/*.test.ts"],
setupFiles: ["./tests/jest/setupFiles.ts"],
globalSetup: ["./tests/jest/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,
},
},
]);