2026-02-07 15:53:07 +00:00
|
|
|
import path from "node:path";
|
|
|
|
|
|
2026-02-07 09:37:08 +00:00
|
|
|
import { defineConfig } from "vitest/config";
|
|
|
|
|
|
|
|
|
|
export default defineConfig({
|
2026-02-07 15:53:07 +00:00
|
|
|
resolve: {
|
|
|
|
|
alias: {
|
|
|
|
|
"@": path.resolve(__dirname, "./src"),
|
|
|
|
|
},
|
|
|
|
|
},
|
2026-02-07 09:37:08 +00:00
|
|
|
test: {
|
|
|
|
|
environment: "jsdom",
|
|
|
|
|
setupFiles: ["./src/setupTests.ts"],
|
|
|
|
|
globals: true,
|
|
|
|
|
coverage: {
|
|
|
|
|
provider: "v8",
|
|
|
|
|
reporter: ["text", "lcov"],
|
|
|
|
|
reportsDirectory: "./coverage",
|
2026-02-07 15:54:42 +00:00
|
|
|
// Policy (scoped gate): require 100% coverage on *explicitly listed* unit-testable modules first.
|
|
|
|
|
// We'll expand this include list as we add more unit/component tests.
|
2026-02-09 00:29:26 +05:30
|
|
|
include: [
|
|
|
|
|
"src/lib/backoff.ts",
|
|
|
|
|
"src/components/activity/ActivityFeed.tsx",
|
|
|
|
|
],
|
2026-02-07 20:29:50 +05:30
|
|
|
exclude: ["**/*.d.ts", "src/**/__generated__/**", "src/**/generated/**"],
|
2026-02-07 15:54:42 +00:00
|
|
|
thresholds: {
|
|
|
|
|
lines: 100,
|
|
|
|
|
statements: 100,
|
|
|
|
|
functions: 100,
|
|
|
|
|
branches: 100,
|
|
|
|
|
},
|
2026-02-07 09:37:08 +00:00
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
});
|