-
Notifications
You must be signed in to change notification settings - Fork 594
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
Tests not terminating after execution with msw when using FormData and Blob #2413
Comments
since this is likely an issue in blob, you'll have to post it in the node repo, preferably with a reproduction that doesn't use third party dependencies. |
I have the same issue when passing whatever value to the It seems to me that it comes from the clone() method of body: Line 275 in e495094
|
I've reported what looks like a duplicate of this: nodejs/node#52167. Also includes a simple reproduction script without any third-parties. Cloning requests with |
This is fixed here. |
hello @mcollina, was this released? |
Bug Description
I'm encountering an issue where the process does not terminate after running tests with
msw
when usingFormData
andBlob
. Removing the line where theBlob
is appended to theFormData
allows the tests to terminate as expected.Reproducible By
Below is a simplified test case to illustrate the issue:
https://github.com/tokuhirom/msw-formdata-issue
When the above code is executed, the process does not terminate after running the test. However, if the line with
formData.append(...)
is commented out, the process terminates correctly. It seems that the use of FormData in combination with Blob in msw setup is causing some resources to not be released properly.Expected Behavior
exit the process after running all tests.
Logs & Screenshots
Environment
Node.js 21.1.0
Additional context
At first, I noted this issue to msw repo, but msw author suggest to post this issue to undici.
ref. mswjs/msw#1843
The text was updated successfully, but these errors were encountered: