Skip to content

Commit

Permalink
Improve debug reporter look
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Sep 5, 2021
1 parent 586c2ed commit 9c7cbdf
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/report/reporters/debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import { getTables } from '../utils/table.js'
// Debugging reporter only meant for development purpose
const reportTerminal = function ({ combinations, screenWidth }) {
const statNames = getStatNames(combinations)
const headerRow = getHeaderRow(statNames)
const headerRows = getHeaderRow(statNames)
const bodyRows = getBodyRows(combinations, statNames)
return getTables([headerRow, ...bodyRows], screenWidth)
return getTables([...headerRows, ...bodyRows], screenWidth)
}

// Retrieve the list of columns, each corresponding to a stat.
Expand Down Expand Up @@ -44,7 +44,9 @@ const hasStat = function (combinations, statName) {
}

const getHeaderRow = function (statNames) {
return statNames.length === 0 ? [] : ['', ...statNames.map(getHeaderName)]
const firstRow =
statNames.length === 0 ? [] : ['', ...statNames.map(getHeaderName)]
return [firstRow, []]
}

const getHeaderName = function (statName) {
Expand Down

0 comments on commit 9c7cbdf

Please sign in to comment.