返回 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 globalSetup: ["./vitest.global-setup.ts"],
12 include: [
13 "lib/**/*.test.ts",
14 "components/**/*.test.tsx",
15 // The embedded runtime dashboard ships as plain ESM inside the Rust
16 // crate, but its target-resolution rail decides whether a reply or an
17 // approval is sent at all (#4397). Reaching outside `web/` keeps the
18 // test next to the module it covers while still running under the one
19 // JS test job CI has.
20 "../crates/tui/src/runtime_web/**/*.test.mjs",
21 ],
22 },
23 });
24
24 lines TYPESCRIPT