diff --git a/src/reporters/fancy.js b/src/reporters/fancy.js index 2014bbe..4af8fe7 100644 --- a/src/reporters/fancy.js +++ b/src/reporters/fancy.js @@ -64,16 +64,18 @@ export default class FancyReporter extends BasicReporter { const tag = logObj.tag ? secondaryColor(logObj.tag) : '' + let line let left = this.filterAndJoin([type, message]) let right = this.filterAndJoin([tag, date]) - const space = width - stringWidth(left) - stringWidth(right) - 2 - - let line = space > 0 ? (left + ' '.repeat(space) + right) : left + if (width > 80) { + const space = width - stringWidth(left) - stringWidth(right) - 2 + line = space > 0 ? (left + ' '.repeat(space) + right) : left + } else { + line = right + ' ' + left + } - line += additional.length - ? '\n' + additional.join('\n') - : '' + line += additional.length ? '\n' + additional.join('\n') : '' return isBadge ? '\n' + line + '\n' : line }