msw 1.2.0 → 1.2.2
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/README.md +38 -9
- package/lib/iife/index.js +250 -252
- package/lib/iife/index.js.map +1 -1
- package/lib/index.js +11 -10
- package/lib/index.js.map +1 -1
- package/lib/mockServiceWorker.js +1 -1
- package/lib/native/index.js +2 -1
- package/lib/native/index.mjs +2 -1
- package/lib/node/index.js +2 -1
- package/lib/node/index.js.map +1 -1
- package/lib/node/index.mjs +2 -1
- package/lib/node/index.mjs.map +1 -1
- package/package.json +5 -5
package/lib/mockServiceWorker.js
CHANGED
package/lib/native/index.js
CHANGED
|
@@ -798,9 +798,10 @@ function prepareRequest(request) {
|
|
|
798
798
|
var import_headers_polyfill5 = require("headers-polyfill");
|
|
799
799
|
function prepareResponse(res) {
|
|
800
800
|
const responseHeaders = (0, import_headers_polyfill5.objectToHeaders)(res.headers);
|
|
801
|
+
const parsedBody = parseBody(res.body, responseHeaders);
|
|
801
802
|
return {
|
|
802
803
|
...res,
|
|
803
|
-
body:
|
|
804
|
+
body: parsedBody
|
|
804
805
|
};
|
|
805
806
|
}
|
|
806
807
|
|
package/lib/native/index.mjs
CHANGED
|
@@ -797,9 +797,10 @@ function prepareRequest(request) {
|
|
|
797
797
|
import { objectToHeaders as objectToHeaders2 } from "headers-polyfill";
|
|
798
798
|
function prepareResponse(res) {
|
|
799
799
|
const responseHeaders = objectToHeaders2(res.headers);
|
|
800
|
+
const parsedBody = parseBody(res.body, responseHeaders);
|
|
800
801
|
return {
|
|
801
802
|
...res,
|
|
802
|
-
body:
|
|
803
|
+
body: parsedBody
|
|
803
804
|
};
|
|
804
805
|
}
|
|
805
806
|
|
package/lib/node/index.js
CHANGED
|
@@ -802,9 +802,10 @@ function prepareRequest(request) {
|
|
|
802
802
|
var import_headers_polyfill5 = require("headers-polyfill");
|
|
803
803
|
function prepareResponse(res) {
|
|
804
804
|
const responseHeaders = (0, import_headers_polyfill5.objectToHeaders)(res.headers);
|
|
805
|
+
const parsedBody = parseBody(res.body, responseHeaders);
|
|
805
806
|
return {
|
|
806
807
|
...res,
|
|
807
|
-
body:
|
|
808
|
+
body: parsedBody
|
|
808
809
|
};
|
|
809
810
|
}
|
|
810
811
|
|