nock 13.0.1 → 13.0.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
CHANGED
|
@@ -574,7 +574,7 @@ const scope = nock('http://www.headdy.com')
|
|
|
574
574
|
|
|
575
575
|
#### Including Content-Length Header Automatically
|
|
576
576
|
|
|
577
|
-
When using `
|
|
577
|
+
When using `interceptor.reply()` to set a response body manually, you can have the
|
|
578
578
|
`Content-Length` header calculated automatically.
|
|
579
579
|
|
|
580
580
|
```js
|
|
@@ -295,6 +295,9 @@ class InterceptedRequestRouter {
|
|
|
295
295
|
'interceptor identified, starting mocking'
|
|
296
296
|
)
|
|
297
297
|
|
|
298
|
+
matchedInterceptor.markConsumed()
|
|
299
|
+
matchedInterceptor.req = req
|
|
300
|
+
|
|
298
301
|
// wait to emit the finish event until we know for sure an Interceptor is going to playback.
|
|
299
302
|
// otherwise an unmocked request might emit finish twice.
|
|
300
303
|
req.emit('finish')
|
|
@@ -124,8 +124,6 @@ function playbackInterceptor({
|
|
|
124
124
|
const { logger } = interceptor.scope
|
|
125
125
|
|
|
126
126
|
function start() {
|
|
127
|
-
interceptor.markConsumed()
|
|
128
|
-
interceptor.req = req
|
|
129
127
|
req.headers = req.getHeaders()
|
|
130
128
|
|
|
131
129
|
interceptor.scope.emit('request', req, interceptor, requestBodyString)
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"testing",
|
|
8
8
|
"isolation"
|
|
9
9
|
],
|
|
10
|
-
"version": "13.0.
|
|
10
|
+
"version": "13.0.2",
|
|
11
11
|
"author": "Pedro Teixeira <pedro.teixeira@gmail.com>",
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"eslint-config-prettier": "^6.0.0",
|
|
38
38
|
"eslint-config-standard": "^14.0.0",
|
|
39
39
|
"eslint-plugin-import": "^2.16.0",
|
|
40
|
-
"eslint-plugin-mocha": "^
|
|
40
|
+
"eslint-plugin-mocha": "^7.0.1",
|
|
41
41
|
"eslint-plugin-node": "^11.0.0",
|
|
42
42
|
"eslint-plugin-promise": "^4.1.1",
|
|
43
43
|
"eslint-plugin-standard": "^4.0.0",
|