Skip to content

Commit ff4c9dc

Browse files
committed
The color of the failed-tests summary line at the end of the test-suite run will not print in green when there are no test failures.
1 parent 61e4961 commit ff4c9dc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

main.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,12 @@ func main() {
4747
Green, "Manager", "STATUS",
4848
fmt.Sprintf("Tests passed successfully: %d", testsPassed),
4949
)
50+
failureColor := Green
51+
if testsFailed != 0 {
52+
failureColor = Red
53+
}
5054
PrintMessage(
51-
Red, "Manager", "STATUS",
55+
failureColor, "Manager", "STATUS",
5256
fmt.Sprintf("Tests failures: %d", testsFailed),
5357
)
5458
}

0 commit comments

Comments
 (0)