Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: added support for FormData bodies in jsdom to MockedRequest (#1327) #1422

Closed
wants to merge 1 commit into from

Conversation

ddolcimascolo
Copy link

Tentative fix for #1327.

I've no clue if this is fixed at the right place 😅

@ddolcimascolo ddolcimascolo mentioned this pull request Oct 2, 2022
4 tasks
@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 2, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 631d0a6:

Sandbox Source
MSW React Configuration

@@ -37,6 +37,7 @@ export type DefaultRequestMultipartBody = Record<
export type DefaultBodyType =
| Record<string, any>
| DefaultRequestMultipartBody
| FormData
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formdata won't exist in node. I think we need to use a polyfill for both types and runtime.

package.json Outdated Show resolved Hide resolved
@kettanaito
Copy link
Member

Hey, @ddolcimascolo. Thanks for working on this!

I'm working on Fetch API support in MSW (#1436), which will also imply that intercepted requests can be read as FormData. I'm closing this pull request in favor of #1436 but highly encourage you to try it out (more details in #1464). Thanks.

@kettanaito kettanaito closed this Nov 16, 2022
@kettanaito
Copy link
Member

Released: v2.0.0 🎉

This has been released in v2.0.0!

Make sure to always update to the latest version (npm i msw@latest) to get the newest features and bug fixes.


Predictable release automation by @ossjs/release.

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.

2 participants