From 3ae18561e21114d580b3fcd2791b1c78ca86ab04 Mon Sep 17 00:00:00 2001 From: Metod Date: Mon, 16 Oct 2017 17:43:28 +0300 Subject: [PATCH] use writeStream.columns to determine max length of the output --- lib/reporters/dot_reporter.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/reporters/dot_reporter.js b/lib/reporters/dot_reporter.js index eaf9af9c7..6e5cab0c2 100644 --- a/lib/reporters/dot_reporter.js +++ b/lib/reporters/dot_reporter.js @@ -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(' '); } @@ -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 '); }