nock 13.3.1 → 13.3.3
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 +3 -0
- package/lib/intercept.js +5 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -9,6 +9,9 @@
|
|
|
9
9
|
[npmjs]: https://www.npmjs.com/package/nock
|
|
10
10
|
[build]: https://travis-ci.org/nock/nock
|
|
11
11
|
|
|
12
|
+
> **Warning**
|
|
13
|
+
> nock is currently not compatible with Node's experimental native `fetch` implementation. See [#2397](https://github.com/nock/nock/issues/2397)
|
|
14
|
+
|
|
12
15
|
HTTP server mocking and expectations library for Node.js
|
|
13
16
|
|
|
14
17
|
Nock can be used to test modules that perform HTTP requests in isolation.
|
package/lib/intercept.js
CHANGED
|
@@ -218,7 +218,11 @@ function removeInterceptor(options) {
|
|
|
218
218
|
) {
|
|
219
219
|
for (let i = 0; i < allInterceptors[baseUrl].interceptors.length; i++) {
|
|
220
220
|
const interceptor = allInterceptors[baseUrl].interceptors[i]
|
|
221
|
-
if (
|
|
221
|
+
if (
|
|
222
|
+
options instanceof Interceptor
|
|
223
|
+
? interceptor === options
|
|
224
|
+
: interceptor._key === key
|
|
225
|
+
) {
|
|
222
226
|
allInterceptors[baseUrl].interceptors.splice(i, 1)
|
|
223
227
|
interceptor.scope.remove(key, interceptor)
|
|
224
228
|
break
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"testing",
|
|
8
8
|
"isolation"
|
|
9
9
|
],
|
|
10
|
-
"version": "13.3.
|
|
10
|
+
"version": "13.3.3",
|
|
11
11
|
"author": "Pedro Teixeira <pedro.teixeira@gmail.com>",
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"propagate": "^2.0.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@definitelytyped/dtslint": "^0.0.
|
|
31
|
+
"@definitelytyped/dtslint": "^0.0.163",
|
|
32
32
|
"@sinonjs/fake-timers": "^10.0.0",
|
|
33
33
|
"assert-rejects": "^1.0.0",
|
|
34
34
|
"chai": "^4.1.2",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"mocha": "^9.1.3",
|
|
46
46
|
"npm-run-all": "^4.1.5",
|
|
47
47
|
"nyc": "^15.0.0",
|
|
48
|
-
"prettier": "2.
|
|
48
|
+
"prettier": "2.8.8",
|
|
49
49
|
"proxyquire": "^2.1.0",
|
|
50
50
|
"rimraf": "^3.0.0",
|
|
51
|
-
"semantic-release": "^
|
|
51
|
+
"semantic-release": "^21.0.2",
|
|
52
52
|
"sinon": "^15.0.1",
|
|
53
53
|
"sinon-chai": "^3.7.0",
|
|
54
|
-
"typescript": "^
|
|
54
|
+
"typescript": "^5.0.4"
|
|
55
55
|
},
|
|
56
56
|
"scripts": {
|
|
57
57
|
"format:fix": "prettier --write '**/*.{js,json,md,ts,yml,yaml}'",
|