Skip to content

Commit

Permalink
[fix] Fix failed assertions output
Browse files Browse the repository at this point in the history
Latest changes made to Vows in order to make it compatible with `node
v0.5.x` (see issue vowsjs#141) introduce a bug which caused Vows to output
only file name and line when assertion fails:

    when testing
      ✗ should output details
        »  // test.js:8

This turned out to be a really small bug. Output works now:

    when testing
      ✗ should output details
        » expected { a: 1, b: 3 },
          got      { a: 1, b: 2 } (deepEqual) // test.js:8

Sorry for that.
  • Loading branch information
mmalecki committed Oct 24, 2011
1 parent ef4a803 commit 7290532
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/assert/error.js
Expand Up @@ -19,7 +19,7 @@ require('assert').AssertionError.prototype.toString = function () {

if (this.message) {
return stylize(parse(this.message), 'yellow') +
(source) ? stylize(' // ' + source[1] + source[2], 'grey') : '';
((source) ? stylize(' // ' + source[1] + source[2], 'grey') : '');
} else {
return stylize([
this.expected,
Expand Down

0 comments on commit 7290532

Please sign in to comment.