diff --git a/src/PrettyPrinter.js b/src/PrettyPrinter.js index 16021b670..a5476347c 100644 --- a/src/PrettyPrinter.js +++ b/src/PrettyPrinter.js @@ -29,14 +29,14 @@ jasmine.PrettyPrinter.prototype.format = function(value) { this.emitString(value); } else if (jasmine.isSpy(value)) { this.emitScalar("spy on " + value.identity); + } else if (value instanceof RegExp) { + this.emitScalar(value.toString()); } else if (typeof value === 'function') { this.emitScalar('Function'); } else if (typeof value.nodeType === 'number') { this.emitScalar('HTMLNode'); } else if (value instanceof Date) { this.emitScalar('Date(' + value + ')'); - } else if (value instanceof RegExp) { - this.emitScalar(value.toString()); } else if (value.__Jasmine_been_here_before__) { this.emitScalar(''); } else if (jasmine.isArray_(value) || typeof value == 'object') {