Update checked-in dependencies
This commit is contained in:
parent
99c9f6a498
commit
e266801e21
242 changed files with 2638 additions and 9296 deletions
14
node_modules/nock/lib/intercept.js
generated
vendored
14
node_modules/nock/lib/intercept.js
generated
vendored
|
|
@ -110,7 +110,7 @@ function addInterceptor(key, interceptor, scope, scopeOptions, host) {
|
|||
}
|
||||
|
||||
function remove(interceptor) {
|
||||
if (interceptor.__nock_scope.shouldPersist() || --interceptor.counter > 0) {
|
||||
if (--interceptor.counter > 0) {
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -122,6 +122,12 @@ function remove(interceptor) {
|
|||
// matching instance. I'm also not sure why we couldn't delete _all_
|
||||
// matching instances.
|
||||
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
|
||||
})
|
||||
}
|
||||
|
|
@ -218,7 +224,11 @@ function removeInterceptor(options) {
|
|||
) {
|
||||
for (let i = 0; i < allInterceptors[baseUrl].interceptors.length; i++) {
|
||||
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)
|
||||
interceptor.scope.remove(key, interceptor)
|
||||
break
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue