MCPcopy Create free account
hub / github.com/driangle/taskmd / TestRunStats_TableOutput

Function TestRunStats_TableOutput

apps/cli/internal/cli/stats_test.go:136–151  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

134}
135
136func TestRunStats_TableOutput(t *testing.T) {
137 tmpDir := createStatsTestFiles(t)
138 resetStatsFlags()
139 statsFormat = "table"
140
141 output, err := captureStatsOutput(t, []string{tmpDir})
142 if err != nil {
143 t.Fatalf("runStats failed: %v", err)
144 }
145
146 for _, expected := range []string{"TASK STATISTICS", "BY STATUS:", "BY PRIORITY:", "BY EFFORT:"} {
147 if !strings.Contains(output, expected) {
148 t.Errorf("table output missing %q:\n%s", expected, output)
149 }
150 }
151}
152
153func TestRunStats_InvalidFormat(t *testing.T) {
154 tmpDir := createStatsTestFiles(t)

Callers

nothing calls this directly

Calls 3

createStatsTestFilesFunction · 0.85
resetStatsFlagsFunction · 0.85
captureStatsOutputFunction · 0.85

Tested by

no test coverage detected