Skip to content

Fix/msw faker split#1

Open
ingvaldlorentzen wants to merge 2 commits into
masterfrom
fix/msw-faker-split
Open

Fix/msw faker split#1
ingvaldlorentzen wants to merge 2 commits into
masterfrom
fix/msw-faker-split

Conversation

@ingvaldlorentzen

Copy link
Copy Markdown
Owner

No description provided.

In split and split-tags output, `<name>.msw.ts` now imports the
`get<Op>ResponseMock` factories from `<name>.faker.ts` instead of
duplicating them inline. MSW-only output drops the faker import and
strips factory fallbacks to `undefined`.

Cross-file faker imports are derived from the names the MSW handler
actually calls, intersected with the names the faker file exports, so
the import list stays in lock-step with the handler under
`generateEachHttpStatus`.

Regenerate the MSW sample apps and snapshots to match the new layout.
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