-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.ts
More file actions
24 lines (23 loc) · 1.08 KB
/
Copy pathvitest.config.ts
File metadata and controls
24 lines (23 loc) · 1.08 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
import { defineConfig } from "vitest/config";
/**
* Vitest root (LLD §1 calls this `vitest.workspace.ts`).
*
* Uses `test.projects` rather than a `vitest.workspace.ts` file because Vitest
* 3.2 deprecates the latter and prints a warning on every run; a permanent
* warning in CI output is how real warnings stop being read. Same semantics,
* same per-project configs.
*
* Each project keeps its own `vitest.config.ts` so a package's tests run in
* isolation (`npm test -w @codegraph/core-domain`) as well as from the root —
* HLD §3 "Testability" wants every unit runnable on its own, which a single
* merged `include` would quietly take away.
*/
export default defineConfig({
test: {
// Listed explicitly rather than widened to `apps/*`. The reason was `apps/desktop`,
// which ran its own Vitest and a Playwright suite a root glob would have tried to
// collect; that app has been removed. Kept explicit anyway — an app that wants its
// tests run from the root should have to say so.
projects: ["apps/cli", "apps/web", "apps/worker", "packages/*"],
},
});