fixes #77 - Tester#assertEquals outputs 'undefined' if no message provided
Showing
1 changed file
with
1 additions
and
0 deletions
... | @@ -118,6 +118,7 @@ var Tester = function(casper, options) { | ... | @@ -118,6 +118,7 @@ var Tester = function(casper, options) { |
118 | */ | 118 | */ |
119 | this.assertEquals = function assertEquals(subject, expected, message) { | 119 | this.assertEquals = function assertEquals(subject, expected, message) { |
120 | var eventName; | 120 | var eventName; |
121 | message = message || ""; | ||
121 | if (this.testEquals(subject, expected)) { | 122 | if (this.testEquals(subject, expected)) { |
122 | eventName = "success"; | 123 | eventName = "success"; |
123 | casper.echo(this.colorize(this.options.passText, 'INFO') + ' ' + this.formatMessage(message)); | 124 | casper.echo(this.colorize(this.options.passText, 'INFO') + ' ' + this.formatMessage(message)); | ... | ... |
-
Please register or sign in to post a comment