use jasmineMatches for equality testing of complicated matchers

This commit is contained in:
gvanhove
2011-03-15 08:23:38 -07:00
parent 4f2fcff15a
commit 67ec0af254
4 changed files with 154 additions and 6 deletions

View File

@@ -23,7 +23,7 @@ jasmine.PrettyPrinter.prototype.format = function(value) {
this.emitScalar('null');
} else if (value === jasmine.getGlobal()) {
this.emitScalar('<global>');
} else if (value.hasOwnProperty("jasmineToString")) {
} else if (value.jasmineToString) {
this.emitScalar(value.jasmineToString());
} else if (typeof value === 'string') {
this.emitString(value);