test(fixtures): add vite-kitchen fixture repo

Minimal Vite + React + TS + Tailwind app with a typed-props Button
component (the future react-docgen-typescript scan target), landed at
fixtures/ outside the pnpm workspace and turbo graph. Its dependencies
exist on paper only — the runner installs them after cloning (story 04);
no lockfile, never pnpm-installed here.

Ignore surfaces follow the docs/product/reference precedent: fallow,
root ESLint, prettier, and the coverage:diff ALLOWED_GLOBS all skip
fixtures/**.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016j8z4VHjedXDTjEDNg7qHK
This commit is contained in:
2026-07-12 21:36:21 +02:00
parent fe9b2c4151
commit 1ae4a2385c
14 changed files with 164 additions and 1 deletions

View File

@@ -55,6 +55,10 @@ const ALLOWED_GLOBS = [
// Design reference material (ADR-029) — read-only prototypes committed
// under docs/product/reference/; never executed, never tested.
/^docs\/product\/reference\//,
// Test fixture repos — standalone apps outside the pnpm workspace and
// turbo graph (walking-skeleton story 01); served to tests as git remotes,
// never executed by vitest, never in any lcov.
/^fixtures\//,
// Shell scripts (not Vitest-covered)
/\.sh$/,
/\.bash$/,

View File

@@ -314,6 +314,21 @@ describe("computeDiffCoverage", () => {
assert.equal(result.summary.filesChanged, 3);
});
test("skips fixtures/ files (fixture repos, walking-skeleton story 01)", () => {
const lcov = parseLcov(lcovText);
const diff = new Map([
// Standalone fixture apps served to tests as git remotes — never
// executed by vitest, never in any lcov
["fixtures/vite-kitchen/src/components/Button.tsx", new Set([1, 2, 3])],
["fixtures/vite-kitchen/src/main.tsx", new Set([1, 2])],
["fixtures/vite-kitchen/vite.config.ts", new Set([1])],
]);
const result = computeDiffCoverage(diff, lcov);
assert.equal(result.status, "pass");
assert.equal(result.summary.filesGated, 0);
assert.equal(result.summary.filesChanged, 3);
});
test("end-to-end fixture: mixed pass/fail/skip/no-data", () => {
const lcov = parseLcov(lcovText);
const diff = parseGitDiff(diffText);