Socket
Socket
Sign inDemoInstall

nock

Package Overview
Dependencies
Maintainers
4
Versions
430
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nock - npm Package Compare versions

Comparing version 13.3.1 to 13.3.2

14

lib/intercept.js

@@ -113,3 +113,3 @@ 'use strict'

function remove(interceptor) {
if (interceptor.__nock_scope.shouldPersist() || --interceptor.counter > 0) {
if (--interceptor.counter > 0) {
return

@@ -126,2 +126,8 @@ }

interceptors.some(function (thisInterceptor, i) {
if (interceptor.__nock_scope.shouldPersist()) {
return thisInterceptor === interceptor
? interceptors.push(interceptors.splice(i, 1)[0])
: false
}
return thisInterceptor === interceptor ? interceptors.splice(i, 1) : false

@@ -223,3 +229,7 @@ })

const interceptor = allInterceptors[baseUrl].interceptors[i]
if (interceptor._key === key) {
if (
options instanceof Interceptor
? interceptor === options
: interceptor._key === key
) {
allInterceptors[baseUrl].interceptors.splice(i, 1)

@@ -226,0 +236,0 @@ interceptor.scope.remove(key, interceptor)

10

package.json

@@ -10,3 +10,3 @@ {

],
"version": "13.3.1",
"version": "13.3.2",
"author": "Pedro Teixeira <pedro.teixeira@gmail.com>",

@@ -32,3 +32,3 @@ "repository": {

"devDependencies": {
"@definitelytyped/dtslint": "^0.0.159",
"@definitelytyped/dtslint": "^0.0.163",
"@sinonjs/fake-timers": "^10.0.0",

@@ -50,9 +50,9 @@ "assert-rejects": "^1.0.0",

"nyc": "^15.0.0",
"prettier": "2.7.1",
"prettier": "2.8.8",
"proxyquire": "^2.1.0",
"rimraf": "^3.0.0",
"semantic-release": "^19.0.2",
"semantic-release": "^21.0.2",
"sinon": "^15.0.1",
"sinon-chai": "^3.7.0",
"typescript": "^4.2.2"
"typescript": "^5.0.4"
},

@@ -59,0 +59,0 @@ "scripts": {

@@ -12,2 +12,5 @@ # Nock

> **Warning**
> nock is currently not compatible with Node's experimental native `fetch` implementation. See [#2397](https://github.com/nock/nock/issues/2397)
HTTP server mocking and expectations library for Node.js

@@ -1006,3 +1009,3 @@

Note that while a persisted scope will always intercept the requests, it is considered "done" after the first interception.
Note that while a persisted scope will always intercept the requests, it is considered "done" after the first interception, and they are pushed to the bottom of the stack after consumption.

@@ -1009,0 +1012,0 @@ If you want to stop persisting an individual persisted mock you can call `persist(false)`:

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc