-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.workspace.ts
More file actions
41 lines (39 loc) · 1.16 KB
/
Copy pathvitest.workspace.ts
File metadata and controls
41 lines (39 loc) · 1.16 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
import { fileURLToPath } from "node:url";
import { defineConfig } from "vitest/config";
const packageAlias = (name: string, entry = "index.ts") => ({
[`@pi-desktop/${name}`]: fileURLToPath(
new URL(`./packages/${name}/src/${entry}`, import.meta.url),
),
[`@pi-desktop/${name}/*`]: fileURLToPath(
new URL(`./packages/${name}/src`, import.meta.url),
),
});
export default defineConfig({
test: {
projects: [
"./apps/desktop/vitest.config.ts",
"./packages/agent-host/vitest.config.ts",
"./packages/contracts/vitest.config.ts",
"./packages/shared/vitest.config.ts",
"./packages/shell-model/vitest.config.ts",
"./packages/ui/vitest.config.ts",
{
resolve: {
alias: {
...packageAlias("contracts"),
...packageAlias("shared"),
...packageAlias("ui"),
...packageAlias("shell-model"),
...packageAlias("agent-host"),
},
},
test: {
name: "integration",
environment: "node",
include: ["tests/integration/**/*.spec.ts"],
exclude: ["tests/e2e/**/*.spec.ts"],
},
},
],
},
});