diff --git a/lib/reporters/cli/index.js b/lib/reporters/cli/index.js index 3728a2874..9a7fe1721 100644 --- a/lib/reporters/cli/index.js +++ b/lib/reporters/cli/index.js @@ -426,12 +426,17 @@ _.assignIn(PostmanCLIReporter, { * @returns {Table} - The constructed collection run statistics table. */ parseStatistics (stats, timings, transfers, options) { - var summaryTable; + var summaryTable, + style = { head: [] }; + + if (cliUtils.noTTY(options.color)) { + style.border = []; + } // create the summary table summaryTable = new Table({ chars: options.disableUnicode && cliUtils.cliTableTemplateFallback, - style: { head: [] }, + style: style, head: [E, 'executed', ' failed'], colAligns: ['right', 'right', 'right'], colWidths: [25] diff --git a/test/cli/color-tty.test.js b/test/cli/color-tty.test.js index 1e5e34938..a043723f7 100644 --- a/test/cli/color-tty.test.js +++ b/test/cli/color-tty.test.js @@ -3,7 +3,7 @@ const fs = require('fs'), describe('CLI output', function () { // eslint-disable-next-line no-control-regex - const coloredOutput = /^[\u001b[0m]+newman/; + const coloredOutput = /\u001b/; describe('TTY', function () { // @todo: Change to assert colored output after https://github.com/shelljs/shelljs/pull/524 is released