Skip to content

Commit 2af06b8

Browse files
committed
Fix nocoverageredesign
1 parent 254a920 commit 2af06b8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

internal/app/table_summary.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,13 @@ func (c *consoleWriter) summaryTable(
176176
case parse.ActionFail:
177177
status = c.red(status)
178178
}
179+
180+
// Skip packages with 0% coverage and no tests to mimic nocoverageredesign behavior
181+
totalTests := len(pkg.TestsByAction(parse.ActionPass)) + len(pkg.TestsByAction(parse.ActionFail)) + len(pkg.TestsByAction(parse.ActionSkip))
182+
if pkg.Cover && pkg.Coverage == 0.0 && totalTests == 0 {
183+
continue
184+
}
185+
179186
row := summaryRow{
180187
status: status,
181188
elapsed: elapsed,

0 commit comments

Comments
 (0)