Files
mintel.me/apps/web/vitest.config.ts
T
mmintelandClaude Sonnet 5.5 0995a3b5ca test: add vitest, coverage and mutation gate with availability domain core
Pure logic lives in apps/web/src/domain and must stay at 100% coverage and a
100% mutation score. The first unit is the availability logic for the hero:
parsing, resolving and formatting the next free capacity block.

Vitest is pinned to 4.1.11 because @stryker-mutator/vitest-runner 10.0.0
runs zero tests per mutant under vitest 5 and reports surviving mutants.
ESLint now ignores Stryker, coverage and report output.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-03 18:12:47 +02:00

28 lines
781 B
TypeScript

import { fileURLToPath } from "node:url";
import { defineConfig } from "vitest/config";
const root = fileURLToPath(new URL(".", import.meta.url));
export default defineConfig({
resolve: { alias: { "@": root } },
test: {
environment: "node",
include: ["src/**/*.spec.ts", "tests/unit/**/*.spec.ts"],
passWithNoTests: false,
coverage: {
provider: "v8",
// The functional core: pure logic lives in src/domain and must be fully covered.
include: ["src/domain/**/*.ts"],
exclude: ["src/domain/**/*.spec.ts"],
reporter: ["text", "json-summary", "html"],
reportsDirectory: "reports/coverage",
thresholds: {
lines: 100,
functions: 100,
branches: 100,
statements: 100,
},
},
},
});