Skip to content

Commit 1606341

Browse files
author
cloudhead
committed
use json reporter if --json is passed
1 parent 8a1d447 commit 1606341

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lib/vows.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,15 @@ vows.options = {
2727
Emitter: events.EventEmitter,
2828
brief: false,
2929
json: false,
30-
matcher: /.*/,
31-
reporter: require('vows/reporters/console')
30+
matcher: /.*/
3231
};
3332

3433
vows.__defineGetter__('reporter', function () {
35-
return vows.options.reporter;
34+
if (vows.options.json) {
35+
return require('vows/reporters/json');
36+
} else {
37+
return require('vows/reporters/console');
38+
}
3639
});
3740

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

0 commit comments

Comments
 (0)