Pretty-print [new String("")] as "[ '' ]" not "[]"

This commit is contained in:
Steve Gravrock
2022-03-14 18:47:23 -07:00
parent 7f75f23e5b
commit dfa5b6a53d
3 changed files with 10 additions and 2 deletions

View File

@@ -40,7 +40,7 @@ getJasmineRequireObj().makePrettyPrinter = function(j$) {
this.emitScalar('<global>');
} else if (value.jasmineToString) {
this.emitScalar(value.jasmineToString(this.pp_));
} else if (typeof value === 'string') {
} else if (j$.isString_(value)) {
this.emitString(value);
} else if (j$.isSpy(value)) {
this.emitScalar('spy on ' + value.and.identity);