mirror of
https://github.com/status-im/nim-unittest2.git
synced 2025-02-19 13:24:14 +00:00
Don't print empty suites (#50)
In compact mode, remove "empty" suites, which most often happens when filtering which tests to run
This commit is contained in:
parent
88a613ffa4
commit
9c716f162a
@ -615,15 +615,22 @@ method suiteEnded*(formatter: ConsoleOutputFormatter) =
|
||||
totalDurStr = formatDuration(totalDur, false)
|
||||
|
||||
if formatter.outputLevel == OutputLevel.COMPACT:
|
||||
# Complete the line with timing information
|
||||
formatter.write do:
|
||||
if totalDur > slowThreshold:
|
||||
stdout.styledWrite(" ", styleBright, totalDurStr)
|
||||
else:
|
||||
stdout.write(" ", totalDurStr)
|
||||
echo ""
|
||||
do:
|
||||
echo(" ", totalDurStr)
|
||||
if formatter.results.len > 0:
|
||||
# Complete the line with timing information
|
||||
formatter.write do:
|
||||
if totalDur > slowThreshold:
|
||||
stdout.styledWrite(" ", styleBright, totalDurStr)
|
||||
else:
|
||||
stdout.write(" ", totalDurStr)
|
||||
echo ""
|
||||
do:
|
||||
echo(" ", totalDurStr)
|
||||
else:
|
||||
formatter.write do:
|
||||
# If no tests were run, remove the suite name
|
||||
stdout.eraseLine()
|
||||
do:
|
||||
stdout.writeLine("")
|
||||
|
||||
var failed = false
|
||||
if formatter.outputLevel notin {VERBOSE, FAILURES}:
|
||||
|
Loading…
x
Reference in New Issue
Block a user