Skip to content

Commit

Permalink
Merge pull request #67 from tschneidereit/master
Browse files Browse the repository at this point in the history
Don't attempt to clear non-TTY output in simple results reporter
  • Loading branch information
bterlson committed Nov 11, 2016
2 parents 6c34b1b + de61d1a commit 859816a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/reporters/simple.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,12 @@ function simpleReporter(results) {

function clearPassed() {
if (lastPassed) {
process.stdout.clearLine();
process.stdout.cursorTo(0);
if (process.stdout.isTTY) {
process.stdout.clearLine();
process.stdout.cursorTo(0);
} else {
process.stdout.write('\n');
}
}
}
}
Expand Down

0 comments on commit 859816a

Please sign in to comment.