import path from "node:path"; import { mergeConfig } from "vitest/config"; import { jsdomVitestConfig } from "@repo/core-typescript/vitest.base.jsdom"; // Coverage excludes mirror the feature-package pattern (see // packages/auth/vitest.config.ts): framework glue is excluded, thresholds // stay inherited from the shared base — never lowered here. export default mergeConfig(jsdomVitestConfig, { esbuild: { jsx: "automatic" }, test: { coverage: { exclude: [ // TanStack Router route definitions — framework-invoked entry // points, covered by Playwright e2e; not unit tests "src/routes/**", // Server-entry OTel/Sentry boot wiring — import-time side effects // run once at startup (same class as feature DI bootstrap). // instrumentation-client.ts stays counted (it has a unit test). "src/instrumentation.ts", // Ambient type declarations — no executable code "src/**/*.d.ts", ], }, }, resolve: { alias: { "@": path.resolve(__dirname, "./src") } }, });