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

@@ -27,7 +27,7 @@ getJasmineRequireObj().pp = function(j$) {
} else if (typeof value === 'string') {
this.emitString(value);
} else if (j$.isSpy(value)) {
this.emitScalar('spy on ' + value.and.identity());
this.emitScalar('spy on ' + value.and.identity);
} else if (value instanceof RegExp) {
this.emitScalar(value.toString());
} else if (typeof value === 'function') {