Skip to content

Commit

Permalink
use json reporter if --json is passed
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudhead committed May 17, 2010
1 parent 8a1d447 commit 1606341
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/vows.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,15 @@ vows.options = {
Emitter: events.EventEmitter,
brief: false,
json: false,
matcher: /.*/,
reporter: require('vows/reporters/console')
matcher: /.*/
};

vows.__defineGetter__('reporter', function () {
return vows.options.reporter;
if (vows.options.json) {
return require('vows/reporters/json');
} else {
return require('vows/reporters/console');
}
});

var stylize = require('vows/reporters/console').stylize;
Expand Down

0 comments on commit 1606341

Please sign in to comment.