The release-evidence test asserted that every artifact a candidate is assembled from survives the copy, which quietly assumed the checkout had already run the release chain. It holds in this repository and fails in a product repository that has not, where `artifacts/performance/bundle.json` simply does not exist yet — a fact about the checkout, not about the copier. It now asserts that whatever release evidence is present is preserved, and that at least one thing was, so it cannot pass by finding nothing to check. Vitest also walked `.worktrees/`. A git worktree inside the repository is a different checkout of a different branch; running its tests against this checkout's config produces failures that belong to neither and cost real time to attribute. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
29 lines
848 B
TypeScript
29 lines
848 B
TypeScript
import { configDefaults, defineConfig } from "vitest/config";
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
globals: false,
|
|
setupFiles: ["./tests/setup.ts"],
|
|
restoreMocks: true,
|
|
clearMocks: true,
|
|
mockReset: true,
|
|
testTimeout: 10_000,
|
|
exclude: [
|
|
...configDefaults.exclude,
|
|
".tmp/**",
|
|
// A git worktree inside the repository is a different checkout of a
|
|
// different branch. Running its tests against this checkout's config
|
|
// reports failures that belong to neither.
|
|
".worktrees/**",
|
|
"tests/fixtures/v8-coverage-counter-semantics/**",
|
|
],
|
|
coverage: {
|
|
provider: "v8",
|
|
reportsDirectory: "artifacts/tests/coverage",
|
|
reporter: ["text", "json-summary", "lcov"],
|
|
include: ["src/**/*.{ts,tsx}"],
|
|
exclude: ["**/*.d.ts", "**/*.stories.*"],
|
|
},
|
|
},
|
|
});
|