xhr.upload.progress not called when using "passthrough()" #1937
Replies: 2 comments 4 replies
-
Hi, @Ahmad-Alzamer. Thanks for reporting this. Could you please update your post to include your request handler for this request?
The upload event in Axios is meant to be supported in MSW as-is. We have an Axios upload request test but there isn't a case that uses
Not sure I follow. The Lines 15 to 23 in ea28bd9 This instruction later gets interpreted by the library to not produce any mocked response. There's no request cloning as far as I'm concerned but I may be missing something. Do you have some debugging info that made you conclude the request cloning may be causing this? |
Beta Was this translation helpful? Give feedback.
-
Having kinda same problem with passing the through the request as-is. Versions of used libraries: |
Beta Was this translation helpful? Give feedback.
-
I am using AXIOS to upload a file to my backend. I configured a callback to be called for the onProgress
when msw is disabled, the 'onUploadProgress' callback is invoked and I see the messages:
but when I enable MSW, the callback is not invoked.
I belive this is caused by the
passthrough
function passing the cloned object to thefetch
function which does not have the progress event on the upload.is there any plan to have the xhr.upload.progress event supported in MSW?
edit:
forgot to mention earlier, MSW version used:
Beta Was this translation helpful? Give feedback.
All reactions