Permalink
Browse files

added a --json argument to output simple consumable json {total,pass,…

…fail}
  • Loading branch information...
1 parent 8235783 commit 79d3c2bf95719624543620b7977e79fe6edd2d83 @tmpvar committed Apr 4, 2010
Showing with 9 additions and 0 deletions.
  1. +9 −0 lib/runner.js
View
@@ -94,6 +94,15 @@ exports.run = function(testSuites) {
}
}
+ if (args.json) {
+ sys.puts(JSON.stringify({
+ total: total,
+ pass: total-errors.length,
+ fail: errors.length
+ }));
+ process.exit();
+ }
+
if (args.verbose) {
for (var i = 0; i<errors.length; i++)
{

0 comments on commit 79d3c2b

Please sign in to comment.