Use prototype for spy strategy for better memory management

- Also convert `identity` to a property from a method
This commit is contained in:
Gregg Van Hove
2017-11-30 17:30:20 -08:00
parent a63172f53f
commit 21655a82c9
9 changed files with 115 additions and 119 deletions

View File

@@ -40,7 +40,7 @@ getJasmineRequireObj().Spy = function (j$) {
};
callTracker.track(callData);
var returnValue = spyStrategy.exec.apply(this, arguments);
var returnValue = spyStrategy.exec(this, arguments);
callData.returnValue = returnValue;
return returnValue;