Skip to content

test: remove dead no-models.yaml fixture - #208

Merged
7nohe merged 1 commit into
mainfrom
claude/heuristic-herschel-12707a
Aug 11, 2026
Merged

test: remove dead no-models.yaml fixture#208
7nohe merged 1 commit into
mainfrom
claude/heuristic-herschel-12707a

Conversation

@7nohe

@7nohe 7nohe commented Aug 11, 2026

Copy link
Copy Markdown
Owner

What

Deletes tests/inputs/no-models.yaml.

Why

The fixture is dead and broken:

  1. Unreferenced. grep -rn "no-models" across the repo returns zero hits — no test passes it to generateTSClients(prefix, inputFile) (tests/utils.ts:8). The other fixtures (petstore.yaml, dates.yaml, string-pagination.yaml) are all actively used.
  2. Its only consumer is gone. The createImports (No models) test was removed along with all of tests/createImports.test.ts in 606ec44 (refactor: migrate code generation to a ts-morph pipeline).
  3. It was already disabled before that. At bee536d (Support TypeScript5.9.x and hey-api/openapi-ts 0.92.x (#192)) the test read // Skip: no-models.yaml causes upstream @hey-api/openapi-ts error / test.skip(...). We are now on @hey-api/openapi-ts 0.99.0, so the fixture almost certainly still fails to generate.
  4. It was misnamed anyway. Back when the test still ran (606ec44^), it asserted that "../requests/types.gen" was among the imports, and that import was pushed only inside if (modelsFile). So the spec produced a types.gen file regardless — it never reproduced a "models file missing" condition. It should not be resurrected for that purpose.

Verification

  • No references in tests, package.json scripts, vitest.config.ts, or .github/workflows/ (test.yml, release.yml).
  • Checked the case a string search can't catch: no test enumerates tests/inputs via readdir/glob. Every hit for inputs under tests/ is path.join(__dirname, "inputs", <literal>) with petstore.yaml or dates.yaml. The only readdirSync in src/ is the tsconfig lookup in src/generate.mts:23, which is unrelated.
  • No orphaned snapshot left over from 606ec44tests/__snapshots__/ holds only createSource.test.ts.snap and generate.test.ts.snap, both matching live test files.

Test results

Under identical conditions (example codegen not yet run), the suite is unchanged: 188 passed before, 188 passed after. After reproducing the CI setup (pnpm -w build + pnpm --filter @7nohe/react-app generate:api), the full suite is green: 16 files / 194 tests passed — the extra 6 come from examples/react-app/verify-runtime.test.ts becoming loadable once the generated client exists, not from this change.

One full run showed 2 transient failures in tests/parseOperations.test.ts during a slow, heavily loaded run (37s vs the usual 19s). It did not reproduce in 3 isolated runs of that file (11/11 each) or 3 further full-suite runs, and the deleted fixture is referenced by nothing, so it cannot be causal there.

tests/inputs/no-models.yaml is unreferenced and broken. Its only consumer
was the "createImports (No models)" test, which was already disabled with
"Skip: no-models.yaml causes upstream @hey-api/openapi-ts error" before
tests/createImports.test.ts was deleted in 606ec44.

The fixture was also misnamed: back when the test still ran, it asserted
that "../requests/types.gen" WAS among the imports, so the spec produced a
types.gen file anyway and never reproduced a missing-models condition.

No references remain in tests, package.json scripts, vitest.config.ts, or
CI workflows, and no test enumerates tests/inputs.
@vercel

vercel Bot commented Aug 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openapi-react-query-codegen Ready Ready Preview Aug 11, 2026 11:02am

@github-actions

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🟢 Lines 99.22% (🎯 95%) 514 / 518
🟢 Statements 98.51% (🎯 95%) 529 / 537
🟢 Functions 99.25% (🎯 95%) 133 / 134
🟢 Branches 91.73% (🎯 90%) 222 / 242
File CoverageNo changed files found.
Generated in workflow #445 for commit 6ee771d by the Vitest Coverage Report Action

@7nohe
7nohe merged commit 321e3e0 into main Aug 11, 2026
7 of 8 checks passed
@7nohe
7nohe deleted the claude/heuristic-herschel-12707a branch August 11, 2026 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant