Update checked-in dependencies
This commit is contained in:
parent
79817eb679
commit
9c3b394d7f
402 changed files with 12598 additions and 2912 deletions
20
node_modules/sinon/lib/sinon/behavior.js
generated
vendored
20
node_modules/sinon/lib/sinon/behavior.js
generated
vendored
|
|
@ -57,13 +57,13 @@ function getCallbackError(behavior, func, args) {
|
|||
|
||||
if (behavior.callArgProp) {
|
||||
msg = `${functionName(
|
||||
behavior.stub
|
||||
behavior.stub,
|
||||
)} expected to yield to '${valueToString(
|
||||
behavior.callArgProp
|
||||
behavior.callArgProp,
|
||||
)}', but no object with such a property was passed.`;
|
||||
} else {
|
||||
msg = `${functionName(
|
||||
behavior.stub
|
||||
behavior.stub,
|
||||
)} expected to yield, but no callback was passed.`;
|
||||
}
|
||||
|
||||
|
|
@ -87,7 +87,7 @@ function ensureArgs(name, behavior, args) {
|
|||
throw new TypeError(
|
||||
`${name} failed: ${index + 1} arguments required but only ${
|
||||
args.length
|
||||
} present`
|
||||
} present`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -105,13 +105,13 @@ function callCallback(behavior, args) {
|
|||
nextTick(function () {
|
||||
func.apply(
|
||||
behavior.callbackContext,
|
||||
behavior.callbackArguments
|
||||
behavior.callbackArguments,
|
||||
);
|
||||
});
|
||||
} else {
|
||||
return func.apply(
|
||||
behavior.callbackContext,
|
||||
behavior.callbackArguments
|
||||
behavior.callbackArguments,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -178,7 +178,7 @@ const proto = {
|
|||
} else if (typeof this.resolveArgAt === "number") {
|
||||
ensureArgs("resolvesArg", this, args);
|
||||
return (this.promiseLibrary || Promise).resolve(
|
||||
args[this.resolveArgAt]
|
||||
args[this.resolveArgAt],
|
||||
);
|
||||
} else if (this.resolveThis) {
|
||||
return (this.promiseLibrary || Promise).resolve(context);
|
||||
|
|
@ -198,7 +198,7 @@ const proto = {
|
|||
// Call the constructor
|
||||
const F = WrappedClass.bind.apply(
|
||||
WrappedClass,
|
||||
concat([null], argsArray)
|
||||
concat([null], argsArray),
|
||||
);
|
||||
return new F();
|
||||
} else if (typeof this.returnValue !== "undefined") {
|
||||
|
|
@ -239,7 +239,7 @@ const proto = {
|
|||
throw new Error(
|
||||
'Defining a stub by invoking "stub.onCall(...).withArgs(...)" ' +
|
||||
'is not supported. Use "stub.withArgs(...).onCall(...)" ' +
|
||||
"to define sequential behavior for calls with certain arguments."
|
||||
"to define sequential behavior for calls with certain arguments.",
|
||||
);
|
||||
},
|
||||
};
|
||||
|
|
@ -249,7 +249,7 @@ function createBehavior(behaviorMethod) {
|
|||
this.defaultBehavior = this.defaultBehavior || proto.create(this);
|
||||
this.defaultBehavior[behaviorMethod].apply(
|
||||
this.defaultBehavior,
|
||||
arguments
|
||||
arguments,
|
||||
);
|
||||
return this;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue