Update checked-in dependencies

This commit is contained in:
github-actions[bot] 2023-07-13 09:09:17 +00:00
parent 4fad06f438
commit 40a500c743
4168 changed files with 298222 additions and 374905 deletions

View file

@ -1,20 +1,20 @@
"use strict";
var arrayProto = require("@sinonjs/commons").prototypes.array;
var proxyCallUtil = require("./proxy-call-util");
const arrayProto = require("@sinonjs/commons").prototypes.array;
const proxyCallUtil = require("./proxy-call-util");
var push = arrayProto.push;
var forEach = arrayProto.forEach;
var concat = arrayProto.concat;
var ErrorConstructor = Error.prototype.constructor;
var bind = Function.prototype.bind;
const push = arrayProto.push;
const forEach = arrayProto.forEach;
const concat = arrayProto.concat;
const ErrorConstructor = Error.prototype.constructor;
const bind = Function.prototype.bind;
var callId = 0;
let callId = 0;
module.exports = function invoke(func, thisValue, args) {
var matchings = this.matchingFakes(args);
var currentCallId = callId++;
var exception, returnValue;
const matchings = this.matchingFakes(args);
const currentCallId = callId++;
let exception, returnValue;
proxyCallUtil.incrementCallCount(this);
push(this.thisValues, thisValue);
@ -34,7 +34,7 @@ module.exports = function invoke(func, thisValue, args) {
try {
this.invoking = true;
var thisCall = this.getCall(this.callCount - 1);
const thisCall = this.getCall(this.callCount - 1);
if (thisCall.calledWithNew()) {
// Call through with `new`
@ -43,7 +43,10 @@ module.exports = function invoke(func, thisValue, args) {
concat([thisValue], args)
))();
if (typeof returnValue !== "object") {
if (
typeof returnValue !== "object" &&
typeof returnValue !== "function"
) {
returnValue = thisValue;
}
} else {
@ -62,7 +65,7 @@ module.exports = function invoke(func, thisValue, args) {
push(matching.returnValues, returnValue);
});
var err = new ErrorConstructor();
const err = new ErrorConstructor();
// 1. Please do not get stack at this point. It may be so very slow, and not actually used
// 2. PhantomJS does not serialize the stack trace until the error has been thrown:
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/Stack