-
Notifications
You must be signed in to change notification settings - Fork 0
Generate msw handlers from each spec alongside the client #120
Copy link
Copy link
Open
Labels
area: toolingReusable workflows, Gradle, templates, Renovate, and API tooling.Reusable workflows, Gradle, templates, Renovate, and API tooling.component: testsUnit, integration, system, or contract test concern.Unit, integration, system, or contract test concern.priority: P2Medium; normal planned work.Medium; normal planned work.type: testTest coverage, fixtures, or validation changes.Test coverage, fixtures, or validation changes.
Description
Activity
Metadata
Metadata
Assignees
Labels
area: toolingReusable workflows, Gradle, templates, Renovate, and API tooling.Reusable workflows, Gradle, templates, Renovate, and API tooling.component: testsUnit, integration, system, or contract test concern.Unit, integration, system, or contract test concern.priority: P2Medium; normal planned work.Medium; normal planned work.type: testTest coverage, fixtures, or validation changes.Test coverage, fixtures, or validation changes.
What to build
Mock handlers are generated from each spec and published alongside the client, so tests mock the contract instead of a hand-written guess.
Today mocking is done three incompatible ways: a declared but entirely unused interception library in two applications, a large hand-written route mock file with hand-typed fixtures in a third, and module-level mocking of the generated client in unit tests — which means no test exercises transport, base URL, auth headers or CSRF.
Generated handlers become the default because a contract change should move the mocks, and because per-test overrides are what stateful login and streaming flows need.
Acceptance criteria
Blocked by