diff --git a/__tests__/reporters/__snapshots__/console-reporter.js.snap b/__tests__/reporters/__snapshots__/console-reporter.js.snap index ebd842029e..ad869a2132 100644 --- a/__tests__/reporters/__snapshots__/console-reporter.js.snap +++ b/__tests__/reporters/__snapshots__/console-reporter.js.snap @@ -58,7 +58,7 @@ Object { exports[`ConsoleReporter.progress 1`] = ` Object { - "stderr": "░░ 0/2█░ 1/2", + "stderr": "[--] 0/2[#-] 1/2", "stdout": "", } `; @@ -132,11 +132,11 @@ Object { } `; -exports[`ProgressBar 1`] = `"░░ 0/2"`; +exports[`ProgressBar 1`] = `"[--] 0/2"`; -exports[`ProgressBar 2`] = `"░░ 0/2█░ 1/2"`; +exports[`ProgressBar 2`] = `"[--] 0/2[#-] 1/2"`; -exports[`ProgressBar 3`] = `"░░ 0/2█░ 1/2██ 2/2"`; +exports[`ProgressBar 3`] = `"[--] 0/2[#-] 1/2[##] 2/2"`; exports[`Spinner 1`] = `"⠁ "`; @@ -148,7 +148,7 @@ exports[`Spinner 4`] = `"⠁ ⠂ foo⠄ bar"`; exports[`close 1`] = ` Object { - "stderr": "░░ 0/2█░ 1/2⠁ ", + "stderr": "[--] 0/2[#-] 1/2⠁ ", "stdout": "", } `; diff --git a/src/reporters/console/progress-bar.js b/src/reporters/console/progress-bar.js index 10ecff8075..499fc69d00 100644 --- a/src/reporters/console/progress-bar.js +++ b/src/reporters/console/progress-bar.js @@ -23,7 +23,7 @@ export default class ProgressBar { id: ?number; _callback: ?(progressBar: ProgressBar) => void; - static bars = [['█', '░']]; + static bars = [['#', '-']]; tick() { if (this.curr >= this.total) { @@ -68,12 +68,12 @@ export default class ProgressBar { // calculate size of actual bar // $FlowFixMe: investigate process.stderr.columns flow error - const availableSpace = Math.max(0, this.stdout.columns - bar.length - 1); + const availableSpace = Math.max(0, this.stdout.columns - bar.length - 3); const width = Math.min(this.total, availableSpace); const completeLength = Math.round(width * ratio); const complete = this.chars[0].repeat(completeLength); const incomplete = this.chars[1].repeat(width - completeLength); - bar = `${complete}${incomplete}${bar}`; + bar = `[${complete}${incomplete}]${bar}`; toStartOfLine(this.stdout); this.stdout.write(bar);