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

Function TestRunStats_GroupByPhase_Table

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

Source from the content-addressed store, hash-verified

261}
262
263func TestRunStats_GroupByPhase_Table(t *testing.T) {
264 tmpDir := createStatsPhaseTestFiles(t)
265 resetStatsFlags()
266 statsGroupBy = "phase"
267
268 output, err := captureStatsOutput(t, []string{tmpDir})
269 if err != nil {
270 t.Fatalf("runStats failed: %v", err)
271 }
272
273 if !strings.Contains(output, "BY PHASE:") {
274 t.Errorf("expected BY PHASE section in output:\n%s", output)
275 }
276 if !strings.Contains(output, "v0.2:") {
277 t.Errorf("expected v0.2 phase in output:\n%s", output)
278 }
279 if !strings.Contains(output, "v0.3:") {
280 t.Errorf("expected v0.3 phase in output:\n%s", output)
281 }
282}
283
284func TestRunStats_GroupByPhase_JSON(t *testing.T) {
285 tmpDir := createStatsPhaseTestFiles(t)

Callers

nothing calls this directly

Calls 3

resetStatsFlagsFunction · 0.85
captureStatsOutputFunction · 0.85

Tested by

no test coverage detected