Skip to content

Commit

Permalink
add print() function to reporters
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudhead committed Jun 5, 2010
1 parent 151b76c commit b9882a5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/vows/reporters/dot-matrix.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,8 @@ this.report = function (data, s) {
puts('\n\n * ' + stylize(event.error, 'red'));
break;
}
return buffer.join('');
};

this.print = function (str) {
sys.print(str);
};
3 changes: 3 additions & 0 deletions lib/vows/reporters/json.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ var sys = require('sys');
//
// Console JSON reporter
//
this.name = 'json';
this.report = function (obj) {
sys.puts(JSON.stringify(obj));
};

this.print = function (str) {};
3 changes: 3 additions & 0 deletions lib/vows/reporters/spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,6 @@ this.report = function (data, s) {
}
};

this.print = function (str) {
sys.print(str);
};

0 comments on commit b9882a5

Please sign in to comment.