Skip to content

Instantly share code, notes, and snippets.

@fictorial
Created April 2, 2010 00:02
Show Gist options
  • Save fictorial/352546 to your computer and use it in GitHub Desktop.
Save fictorial/352546 to your computer and use it in GitHub Desktop.
assert.AssertionError.prototype.toString = function() {
var desc = [ this.name+":"
, JSON.stringify(this.expected )
, this.operator
, JSON.stringify(this.actual)
].join(" ");
if (this.message) {
return [desc, "("+this.message+")"].join(' ');
} else {
return desc;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment