-
Notifications
You must be signed in to change notification settings - Fork 561
Expand file tree
/
Copy pathvitest.config.js
More file actions
34 lines (32 loc) · 1.16 KB
/
Copy pathvitest.config.js
File metadata and controls
34 lines (32 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
import path from "node:path";
import { fileURLToPath } from "node:url";
import { configDefaults, defineConfig } from "vitest/config";
const __dirname = path.dirname(fileURLToPath(import.meta.url));
export default defineConfig({
resolve: {
alias: {
"@hana/plugin-protocol": path.resolve(__dirname, "packages/plugin-protocol/src/index.ts"),
"@hana/plugin-sdk": path.resolve(__dirname, "packages/plugin-sdk/src/index.ts"),
"@hana/plugin-runtime": path.resolve(__dirname, "packages/plugin-runtime/src/index.ts"),
"@hana/plugin-components": path.resolve(__dirname, "packages/plugin-components/src/index.ts"),
"@": path.resolve(__dirname, "desktop/src/react"),
},
},
test: {
exclude: [
...configDefaults.exclude,
".cache/**",
// git worktree 副本有自己的测试快照,混进主树测试集会双份执行、断言错位
".claude/worktrees/**",
"desktop/native/**/.build/**",
"dist-computer-use/**",
],
testTimeout: 10_000,
setupFiles: ["./tests/setup-auto-updater.ts"],
server: {
deps: {
inline: ["electron-updater", /desktop\/auto-updater/],
},
},
},
});