Skip to content

Commit

Permalink
Fix regexp pretty printing for Chrome.
Browse files Browse the repository at this point in the history
  • Loading branch information
xian committed Nov 27, 2009
1 parent 701ee71 commit 23c5289
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/PrettyPrinter.js
Expand Up @@ -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('<circular reference: ' + (jasmine.isArray_(value) ? 'Array' : 'Object') + '>');
} else if (jasmine.isArray_(value) || typeof value == 'object') {
Expand Down

0 comments on commit 23c5289

Please sign in to comment.