MCPcopy Create free account
hub / github.com/github/gh-aw / TestDisplayStatsTable_Empty

Function TestDisplayStatsTable_Empty

pkg/cli/compile_stats_test.go:14–32  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

12)
13
14func 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
34func TestDisplayStatsTable_LessThan10(t *testing.T) {
35 // Create test stats with 5 workflows

Callers

nothing calls this directly

Calls 4

displayStatsTableFunction · 0.85
CloseMethod · 0.65
StringMethod · 0.45
ErrorfMethod · 0.45

Tested by

no test coverage detected