Skip to content

Commit

Permalink
Make the xunit reporter follow the established pattern of using the v…
Browse files Browse the repository at this point in the history
…ows console module and allowing for overriding the stream.
  • Loading branch information
adamstallard committed Feb 19, 2013
1 parent 98470cb commit e10dc94
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/vows/reporters/xunit.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
// added, see: http://ant.1045680.n5.nabble.com/schema-for-junit-xml-output-td1375274.html
//

var puts = require('util').puts;
var options = { tail: '\n', raw: true };
var console = require('../../vows/console');
var puts = console.puts(options);

var buffer = [],
curSubject = null;
Expand Down Expand Up @@ -47,6 +49,9 @@ function cdata(data) {
}

this.name = 'xunit';
this.setStream = function (s) {
options.stream = s;
};
this.report = function (data) {
var event = data[1];

Expand Down

0 comments on commit e10dc94

Please sign in to comment.