nock 13.0.3 → 13.0.4
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.
|
@@ -296,7 +296,6 @@ class InterceptedRequestRouter {
|
|
|
296
296
|
)
|
|
297
297
|
|
|
298
298
|
matchedInterceptor.markConsumed()
|
|
299
|
-
matchedInterceptor.req = req
|
|
300
299
|
|
|
301
300
|
// wait to emit the finish event until we know for sure an Interceptor is going to playback.
|
|
302
301
|
// otherwise an unmocked request might emit finish twice.
|
|
@@ -149,6 +149,13 @@ function playbackInterceptor({
|
|
|
149
149
|
response.rawHeaders = [...interceptor.rawHeaders]
|
|
150
150
|
logger('response.rawHeaders:', response.rawHeaders)
|
|
151
151
|
|
|
152
|
+
// TODO: MAJOR: Don't tack the request onto the interceptor.
|
|
153
|
+
// The only reason we do this is so that it's available inside reply functions.
|
|
154
|
+
// It would be better to pass the request as an argument to the functions instead.
|
|
155
|
+
// Not adding the req as a third arg now because it should first be decided if (path, body, req)
|
|
156
|
+
// is the signature we want to go with going forward.
|
|
157
|
+
interceptor.req = req
|
|
158
|
+
|
|
152
159
|
if (interceptor.replyFunction) {
|
|
153
160
|
const parsedRequestBody = parseJSONRequestBody(req, requestBodyString)
|
|
154
161
|
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"testing",
|
|
8
8
|
"isolation"
|
|
9
9
|
],
|
|
10
|
-
"version": "13.0.
|
|
10
|
+
"version": "13.0.4",
|
|
11
11
|
"author": "Pedro Teixeira <pedro.teixeira@gmail.com>",
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
"eslint-plugin-node": "^11.0.0",
|
|
42
42
|
"eslint-plugin-promise": "^4.1.1",
|
|
43
43
|
"eslint-plugin-standard": "^4.0.0",
|
|
44
|
+
"form-data": "^3.0.0",
|
|
44
45
|
"got": "^11.3.0",
|
|
45
46
|
"mocha": "^8.0.1",
|
|
46
47
|
"npm-run-all": "^4.1.5",
|