Skip to content
This repository was archived by the owner on Sep 30, 2023. It is now read-only.

Commit 80ac3ae

Browse files
committed
console report spacing and negative array length
1 parent 94a882b commit 80ac3ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/reporter/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ module.exports = async function (output, results, baselines) {
2727
}
2828

2929
function consoleReport (results) {
30-
const sp = (n) => new Array(n).fill(' ').join('')
30+
const sp = (n) => new Array(Math.max(0, n)).fill(' ').join('')
3131
const report =
3232
`
3333
benchmarks report:
@@ -39,7 +39,7 @@ ${benchmarks(results).sort().map(benchmark => [
3939
results[benchmark][env].stats
4040
.map(s => {
4141
const c1 = `${sp(6)}${s[0]}`
42-
const c2 = `${sp(40 - c1.length)}${s[1]}`
42+
const c2 = `${sp(50 - c1.length)}${s[1]}`
4343
const c3 = s[2] ? `${sp(60 - c1.length - c2.length)}${s[2]}` : ''
4444
return c1 + c2 + c3
4545
})

0 commit comments

Comments
 (0)