@zimic/interceptor 1.0.0-rc.3 → 1.0.0-rc.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/http.mjs CHANGED
@@ -563,11 +563,11 @@ async function convertReadableStreamToBlob(stream, options) {
563
563
  const chunks = [];
564
564
  const reader = stream.getReader();
565
565
  while (true) {
566
- const readResult = await reader.read();
567
- if (readResult.value) {
568
- chunks.push(readResult.value);
566
+ const result = await reader.read();
567
+ if (result.value) {
568
+ chunks.push(result.value);
569
569
  }
570
- if (readResult.done) {
570
+ if (result.done) {
571
571
  break;
572
572
  }
573
573
  }
@@ -823,7 +823,10 @@ var HttpRequestHandlerClient = class {
823
823
  if (restrictionBody instanceof ArrayBuffer) {
824
824
  restrictionBodyAsBlob = convertArrayBufferToBlob(restrictionBody, { type: body.type });
825
825
  } else if (restrictionBody instanceof ReadableStream) {
826
- restrictionBodyAsBlob = await convertReadableStreamToBlob(restrictionBody, { type: body.type });
826
+ restrictionBodyAsBlob = await convertReadableStreamToBlob(
827
+ restrictionBody,
828
+ { type: body.type }
829
+ );
827
830
  } else {
828
831
  restrictionBodyAsBlob = restrictionBody;
829
832
  }