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: [ // Next.js App Router entry points — async server components and the // tRPC route-handler mount, invoked by the framework and covered by // Playwright e2e; not unit-testable in jsdom. providers.tsx and // src/server/** stay counted (they have unit tests). "src/app/**/layout.tsx", "src/app/**/page.tsx", "src/app/**/route.ts", // Ambient type declarations — no executable code "src/**/*.d.ts", ], }, }, resolve: { alias: { "@": path.resolve(__dirname, "./src") } }, });