import { defineConfig } from "vitest/config"; import { ciReporters } from "./scripts/test-utils/ci-reporters.mjs"; // Tests are scoped to the directory vitest is invoked from (process.cwd()). // When run from the repo root this picks up all packages; when run from a // package (e.g. via turbo's per-package `test` script) it picks up only // that package's tests. The latter is required because each package only // has @askdb/core symlinked into its own node_modules — running another // package's tests inside the wrong cwd breaks vite's module resolution. export default defineConfig({ test: { // Job summary as one table per CI job; see scripts/test-utils/ci-reporters.mjs. ...ciReporters(), globals: false, environment: "node", include: ["**/*.test.ts", "**/*.test.tsx", "**/*.integration.test.ts"], // The consumer lab is not a workspace member: it has its own install and databases // (see examples/consumer-lab/README.md). // e2e/ holds the verify-askdb replays: `pnpm e2e` runs them, after building what they drive. exclude: ["**/node_modules/**", "**/dist/**", "examples/consumer-lab/**", "e2e/**"], testTimeout: 45_000, hookTimeout: 45_000, }, });