Skip to content

Commit

Permalink
Fixed mocha results printing
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdp committed Jan 14, 2025
1 parent a4c2a27 commit b77ad70
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions framework/src/source/MochaTestReporter.bs
Original file line number Diff line number Diff line change
Expand Up @@ -92,18 +92,19 @@ namespace rooibos
function formatStatsString(stats as rooibos.Stats) as string
statusString = chr(10)

statusString += `${string(1, chr(9))} ${m.colorLines(rooibos.reporter.mocha.colors.brightPass, `${stats.passedCount} passed`)} ${m.colorLines(rooibos.reporter.mocha.colors.light, ` (${stats.time}ms)`)}`
indent = string(1, chr(9))
statusString += `${indent}${m.colorLines(rooibos.reporter.mocha.colors.brightPass, `${stats.passedCount} passed`)} ${m.colorLines(rooibos.reporter.mocha.colors.light, ` (${stats.time}ms)`)}`

if stats.crashedCount > 0
statusString += m.colorLines(rooibos.reporter.mocha.colors.fail, `${string(1, chr(9))}${stats.crashedCount} crashed`)
statusString += chr(10) + m.colorLines(rooibos.reporter.mocha.colors.fail, `${indent}${stats.crashedCount} crashed`)
end if

if stats.failedCount > 0
statusString += m.colorLines(rooibos.reporter.mocha.colors.fail, `${string(1, chr(9))}${stats.failedCount} failing`)
statusString += chr(10) + m.colorLines(rooibos.reporter.mocha.colors.fail, `${indent}${stats.failedCount} failing`)
end if

if stats.ignoredCount > 0
statusString += m.colorLines(rooibos.reporter.mocha.colors.pending, `${string(1, chr(9))}${stats.ignoredCount} skipped`)
statusString += chr(10) + m.colorLines(rooibos.reporter.mocha.colors.pending, `${indent}${stats.ignoredCount} skipped`)
end if

statusString += chr(10)
Expand Down

0 comments on commit b77ad70

Please sign in to comment.