You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
M2: contract-test infrastructure consolidation — shared scaffold, single Support classes (R2-15) #34
From the second verified review of PR #26 (finding R2-15, CONFIRMED). Pure test-infrastructure hygiene; testing-style.md is the spec.
Finding. The M2 contract tests violate the repo's own testing-style rules: the Endpoint/CreateClient/JsonResponse scaffold is copy-pasted verbatim across three contract-test classes; identical wire literals repeat across test methods and files (the {"_tag":"UnknownError",...} and {"_tag":"SessionNotFoundError",...} bodies, the {"data":...} envelope wrapper 6+ times); FixtureLoader exists in Extensions.Tests as a namespace-only byte-copy of the Sdk.Tests one; RecordingHttpHandler exists there as a divergent same-named twin — drift already visible between the copies.
Shape of the fix: one shared contract-test scenario/support home per testing-style.md §1 (central scaffold, domain-aware helpers, wire bodies in fixtures or centralized constants); a single FixtureLoader/RecordingHttpHandler pair reachable from both test projects (shared source or a test-support project — pick whichever the csproj topology makes cleanest without weakening the IVT posture). Also add the missing object-envelope {"data":null} contract test the review verified as working-but-unobserved.
Trigger: the next breadth batch multiplies contract tests; consolidate before the third copy of the scaffold appears.
Milestone: M2 (lands as its own small PR right after PR #26 merges, before the next breadth batch opens).
Activity
test: consolidate the contract-test infrastructure (#35)