Skip to content

Commit 8f0d467

Browse files
committed
fixup: Add documentation for use of GinkgoWriter in tests.Outf
1 parent 9b306db commit 8f0d467

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/colors.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,11 @@ import (
2020
// for an exhaustive list of color options.
2121
func Outf(format string, args ...interface{}) {
2222
s := formatter.F(format, args...)
23+
// Use GinkgoWriter to ensure that output from this function is
24+
// printed sequentially within other test output produced with
25+
// GinkgoWriter (e.g. `STEP:...`) when tests are run in
26+
// parallel. ginkgo collects and writes stdout separately from
27+
// GinkgoWriter during parallel execution and the resulting output
28+
// can be confusing.
2329
ginkgo.GinkgoWriter.Print(s)
2430
}

0 commit comments

Comments
 (0)