import { defineConfig } from "vitest/config"; import { fileURLToPath } from "node:url"; import path from "node:path"; // `@/…` maps to the repo root, matching tsconfig.json's `paths` (`@/*` -> `./*`), // so tests can `import { X } from "@/src/services/…"` exactly as the app code does. const rootDir = path.dirname(fileURLToPath(import.meta.url)); export default defineConfig({ resolve: { alias: { "@": rootDir, }, }, test: { // P0 capability tests. Node environment (these are backend service/adapter // tests, no DOM). The `.realinfra.` test self-skips when its live backend // is unreachable — see tests/p0/iceberg-write-service.realinfra.test.ts. include: ["tests/**/*.test.ts"], environment: "node", globals: false, }, });