(t *testing.T)
| 12 | ) |
| 13 | |
| 14 | func TestDisplayStatsTable_Empty(t *testing.T) { |
| 15 | // Capture stderr output |
| 16 | oldStderr := os.Stderr |
| 17 | r, w, _ := os.Pipe() |
| 18 | os.Stderr = w |
| 19 | |
| 20 | displayStatsTable([]*WorkflowStats{}) |
| 21 | |
| 22 | w.Close() |
| 23 | os.Stderr = oldStderr |
| 24 | |
| 25 | var buf bytes.Buffer |
| 26 | buf.ReadFrom(r) |
| 27 | output := buf.String() |
| 28 | |
| 29 | if output != "" { |
| 30 | t.Errorf("Expected no output for empty stats list, got: %s", output) |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | func TestDisplayStatsTable_LessThan10(t *testing.T) { |
| 35 | // Create test stats with 5 workflows |
nothing calls this directly
no test coverage detected