返回 CodeWhale
vitest.config.ts
根目录 / web / vitest.config.ts
1 import { fileURLToPath } from "node:url";
2 import { defineConfig } from "vitest/config";
3
4 export default defineConfig({
5 resolve: {
6 alias: {
7 "@": fileURLToPath(new URL(".", import.meta.url)),
8 },
9 },
10 test: {
11 include: [
12 "lib/**/*.test.ts",
13 "components/**/*.test.tsx",
14 // The embedded runtime dashboard ships as plain ESM inside the Rust
15 // crate, but its target-resolution rail decides whether a reply or an
16 // approval is sent at all (#4397). Reaching outside `web/` keeps the
17 // test next to the module it covers while still running under the one
18 // JS test job CI has.
19 "../crates/tui/src/runtime_web/**/*.test.mjs",
20 ],
21 },
22 });
23
23 lines TYPESCRIPT