testDoesOutput can be used to test if something is outputted to stdout.
(t *testing.T, logic func(w io.Writer))
| 177 | |
| 178 | // testDoesOutput can be used to test if something is outputted to stdout. |
| 179 | func testDoesOutput(t *testing.T, logic func(w io.Writer)) { |
| 180 | testza.AssertNotZero(t, captureStdout(logic)) |
| 181 | pterm.DisableStyling() |
| 182 | testza.AssertNotZero(t, captureStdout(logic)) |
| 183 | pterm.EnableStyling() |
| 184 | } |
| 185 | |
| 186 | // testEmpty checks that a function does not return a string. |
| 187 | func testEmpty(t *testing.T, logic func(a any) string) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…