Skip to content

test: push Api line coverage from 92.8% to 93.6%#40

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

test: push Api line coverage from 92.8% to 93.6%#40
Theauxm merged 1 commit into
mainfrom
test/coverage-edge-cases

Conversation

@Theauxm
Copy link
Copy Markdown
Member

@Theauxm Theauxm commented May 5, 2026

Summary

Closes the easier remaining gaps in the audit pipeline and JWT builder:

  • `JwtBuilder.CustomizeBearerOptions` — happy path stores the customizer, null-arg throws `ArgumentNullException`.
  • `TraxAuditWriter` — three new scenarios: sink that always throws (drop-after-MaxRetries path), stop during retry backoff (cancellation propagation), quiet channel (empty-batch waiting path).
  • `JsonElementConverter.ToObject` — single test exercises every `JsonValueKind` arm (object, array, string, int, double, long, true, false, null).
  • `TraxAuditDisclaimerHostedService.StartAsync` / `StopAsync` (via reflection since the type is internal).

The remaining big chunks (OIDC pipeline, GraphQL TypeModule field building) need full TestServer scaffolding to hit and are out of scope for this PR.

Test plan

  • `dotnet test tests/Trax.Api.Tests` — passing (4 new in CoverageEdgeTests, 3 new in TraxAuditWriterTests)
  • `dotnet csharpier check .` — clean

…r-retries / cancel-during-backoff / quiet-channel paths, JsonElementConverter every value kind, and TraxAuditDisclaimerHostedService
@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 1507b97 into main May 5, 2026
2 checks passed
@Theauxm Theauxm deleted the test/coverage-edge-cases branch May 5, 2026 18:57
@traxsharp
Copy link
Copy Markdown

traxsharp Bot commented May 8, 2026

This PR is included in version 1.25.0

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