-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.ts
More file actions
28 lines (26 loc) · 837 Bytes
/
vitest.config.ts
File metadata and controls
28 lines (26 loc) · 837 Bytes
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
import { fileURLToPath } from "node:url";
import { defineConfig } from "vitest/config";
const resolveFromRoot = (path: string) =>
fileURLToPath(new URL(path, import.meta.url));
export default defineConfig({
resolve: {
alias: {
"@opencode-ai/plugin": resolveFromRoot("./test/stubs/opencode-plugin.ts"),
"@mariozechner/pi-ai": resolveFromRoot("./test/stubs/pi-ai.ts"),
"@mariozechner/pi-coding-agent": resolveFromRoot(
"./test/stubs/pi-coding-agent.ts",
),
"@mariozechner/pi-tui": resolveFromRoot("./test/stubs/pi-tui.ts"),
},
},
test: {
clearMocks: true,
coverage: {
include: ["opencode/**/*.ts", "pi/**/*.ts", "claude/**/*.js", "codex/**/*.js"],
provider: "v8",
reporter: ["text", "lcov"],
},
environment: "node",
restoreMocks: true,
},
});