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

Function TestStatus_EmptyDirectory

apps/cli/internal/cli/status_test.go:286–298  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

284}
285
286func TestStatus_EmptyDirectory(t *testing.T) {
287 tmpDir := t.TempDir()
288 resetStatusFlags()
289 taskDir = tmpDir
290
291 err := runStatus(statusCmd, []string{"anything"})
292 if err == nil {
293 t.Fatal("Expected error for empty directory")
294 }
295 if !strings.Contains(err.Error(), "task not found") {
296 t.Errorf("Expected 'task not found' error, got: %v", err)
297 }
298}
299
300func createStatusTestFilesWithChildren(t *testing.T) string {
301 t.Helper()

Callers

nothing calls this directly

Calls 3

resetStatusFlagsFunction · 0.85
runStatusFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected