Skip to content

test: push Cli line coverage from 90% to 94%#8

Merged
Theauxm merged 1 commit into
mainfrom
test/coverage-edge-cases
May 5, 2026
Merged

test: push Cli line coverage from 90% to 94%#8
Theauxm merged 1 commit into
mainfrom
test/coverage-edge-cases

Conversation

@Theauxm
Copy link
Copy Markdown
Member

@Theauxm Theauxm commented May 5, 2026

Summary

Adds coverage for OpenAPI edge cases and a GraphQL fallback that were sitting uncovered:

  • OpenAPI: allOf with $ref, allOf without $ref (object fallback), oneOf/anyOf with $ref, oneOf/anyOf with primitives (object fallback), additionalProperties (Dictionary mapping), all scalar formats (uuid, uri, binary, date, date-time, float), untyped fallback, allOf field merging across schemas, operationId collisions disambiguated by path parameters.
  • GraphQL: operations whose return type isn't defined fall back to `object` with a TODO description.

Two compact fixtures (`openapi-edge-cases.json`, `graphql-unknown-type.graphql`) drive six tests. Local line coverage moves from 90.4% to 94.2%; the remaining gaps are mostly defensive throws in `TraxProjectGenerator.RunDotnetNew` and `IsDotnetAvailable` (env-dependent), unreachable switch-default arms, and the top-level `Program.cs` entry point.

Test plan

  • `dotnet test tests/Trax.Cli.Tests` — all passing (6 new)
  • `dotnet csharpier check .` — clean

…s, additionalProperties, operationId disambiguation) and GraphQL unknown-type fallback
@codecov
Copy link
Copy Markdown

codecov Bot commented May 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@Theauxm Theauxm merged commit 06f89a0 into main May 5, 2026
2 checks passed
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