-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvitest.config.ts
More file actions
31 lines (30 loc) · 1.16 KB
/
vitest.config.ts
File metadata and controls
31 lines (30 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
import { defineConfig } from "vitest/config";
import { resolve } from "node:path";
export default defineConfig({
resolve: {
alias: {
"@safeclaw/core": resolve(__dirname, "packages/core/src/index.ts"),
"@safeclaw/sandbox": resolve(__dirname, "packages/sandbox/src/index.ts"),
"@safeclaw/vault": resolve(__dirname, "packages/vault/src/index.ts"),
"@safeclaw/gateway": resolve(__dirname, "packages/gateway/src/index.ts"),
"@safeclaw/cli": resolve(__dirname, "packages/cli/src/index.ts"),
// sandbox-runtime lives in packages/sandbox/node_modules (not root), so we
// pin it to a single resolved path so vi.mock("@anthropic-ai/sandbox-runtime")
// works from any test file in the workspace.
"@anthropic-ai/sandbox-runtime": resolve(
__dirname,
"packages/sandbox/node_modules/@anthropic-ai/sandbox-runtime/dist/index.js",
),
},
},
test: {
globals: false,
passWithNoTests: true,
include: ["packages/*/src/**/*.test.ts", "test/**/*.test.ts"],
coverage: {
provider: "v8",
include: ["packages/*/src/**/*.ts"],
exclude: ["**/*.test.ts", "**/index.ts"],
},
},
});