Improve wrapper function and parameter naming

This commit is contained in:
Elliot Nelson
2020-02-06 10:29:02 -05:00
parent 9febe3159d
commit bf4694333c
3 changed files with 36 additions and 30 deletions
+2 -2
View File
@@ -96,11 +96,11 @@ getJasmineRequireObj().SpyStrategy = function(j$) {
* @since 2.0.0
* @function
*/
SpyStrategy.prototype.exec = function(context, args, isConstructor) {
SpyStrategy.prototype.exec = function(context, args, invokeNew) {
var list = [context].concat(args ? Array.prototype.slice.call(args) : []);
var target = this.plan.bind.apply(this.plan, list);
if (isConstructor) {
if (invokeNew) {
return new target();
} else {
return target();