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

Function TestRunStats_InvalidFormat

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

Source from the content-addressed store, hash-verified

151}
152
153func TestRunStats_InvalidFormat(t *testing.T) {
154 tmpDir := createStatsTestFiles(t)
155 resetStatsFlags()
156 statsFormat = "invalid"
157
158 _, err := captureStatsOutput(t, []string{tmpDir})
159 if err == nil {
160 t.Fatal("expected error for invalid format, got nil")
161 }
162 if !strings.Contains(err.Error(), "unsupported format") {
163 t.Errorf("expected 'unsupported format' error, got: %v", err)
164 }
165}
166
167func TestRunStats_EmptyDir(t *testing.T) {
168 tmpDir := t.TempDir()

Callers

nothing calls this directly

Calls 4

createStatsTestFilesFunction · 0.85
resetStatsFlagsFunction · 0.85
captureStatsOutputFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected