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

Function TestRunStats_InvalidGroupBy

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

Source from the content-addressed store, hash-verified

306}
307
308func TestRunStats_InvalidGroupBy(t *testing.T) {
309 tmpDir := createStatsPhaseTestFiles(t)
310 resetStatsFlags()
311 statsGroupBy = "invalid"
312
313 _, err := captureStatsOutput(t, []string{tmpDir})
314 if err == nil {
315 t.Fatal("expected error for invalid group-by, got nil")
316 }
317 if !strings.Contains(err.Error(), "unsupported group-by field") {
318 t.Errorf("expected 'unsupported group-by field' error, got: %v", err)
319 }
320}
321
322func TestRunStats_PhaseShownWhenPresent(t *testing.T) {
323 tmpDir := createStatsPhaseTestFiles(t)

Callers

nothing calls this directly

Calls 4

resetStatsFlagsFunction · 0.85
captureStatsOutputFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected