Skip to content

Commit

Permalink
use writeStream.columns to determine max length of the output
Browse files Browse the repository at this point in the history
  • Loading branch information
smottt committed Oct 16, 2017
1 parent b575b32 commit 3ae1856
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/reporters/dot_reporter.js
Expand Up @@ -15,6 +15,7 @@ function DotReporter(silent, out) {
this.startTime = new Date();
this.endTime = null;
this.currentLineChars = 0;
this.maxLineChars = Math.min(this.out.columns || 65, 65) - 5;
this.out.write('\n');
this.out.write(' ');
}
Expand All @@ -37,7 +38,7 @@ DotReporter.prototype = {
if (this.silent) {
return;
}
if (this.currentLineChars > 60) {
if (this.currentLineChars > this.maxLineChars) {
this.currentLineChars = 0;
this.out.write('\n ');
}
Expand Down

0 comments on commit 3ae1856

Please sign in to comment.