Skip to content

Commit

Permalink
When JUnit requested, show status on stderr.
Browse files Browse the repository at this point in the history
Reuses the FeedbackLineReporter, so it's a bit chatty right now.
  • Loading branch information
reid committed Feb 5, 2014
1 parent 6c244f8 commit 01592b0
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion lib/cli/index.js
Expand Up @@ -215,6 +215,17 @@ function createReporterForBatch(reporter, batch, console, options) {
batch.on("end", reporter.handleEnd.bind(reporter));
}

function createStderrStatusReporter(cli, batch, options) {
var console = new Console({
exitFn: function () {},
stdin: cli.stdin,
stdout: cli.stderr,
stderr: cli.stderr
});

createReporterForBatch(FeedbackLineReporter, batch, console, options);
}

/**
* @method submitBatch
* @param {Client} client Connected client.
Expand All @@ -230,6 +241,7 @@ CLI.prototype.submitBatch = function submitBatch(client, options, clientOptions,

if (output === "junit") {
reporter = JUnitReporter;
createStderrStatusReporter(this, batch, options);
}

createReporterForBatch(reporter, batch, this, options);
Expand Down Expand Up @@ -332,7 +344,7 @@ CLI.prototype.runBatch = function runBatch(options) {

self.rl.question("When ready, press Enter to begin testing.\n", function () {
self.rl.close();
self.stdin.destroy();
self.stdin.pause();
self.submitBatch(client, options, batchOptions);
});
} else {
Expand Down

0 comments on commit 01592b0

Please sign in to comment.