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

Function TestStatus_NoArgs_ZeroInProgress

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

Source from the content-addressed store, hash-verified

576}
577
578func TestStatus_NoArgs_ZeroInProgress(t *testing.T) {
579 tmpDir := t.TempDir()
580 if err := os.WriteFile(filepath.Join(tmpDir, "001.md"), []byte(`---
581id: "001"
582title: "Done task"
583status: completed
584tags: []
585dependencies: []
586---
587`), 0644); err != nil {
588 t.Fatal(err)
589 }
590
591 resetStatusFlags()
592 taskDir = tmpDir
593
594 stdout, stderr, err := captureStatusNoArgsOutputWithStderr(t)
595 if err != nil {
596 t.Fatalf("unexpected error: %v", err)
597 }
598 if stdout != "" {
599 t.Errorf("expected empty stdout, got: %q", stdout)
600 }
601 if !strings.Contains(stderr, "No tasks currently in progress") {
602 t.Errorf("expected informational message on stderr, got: %q", stderr)
603 }
604}
605
606func TestStatus_NoArgs_ZeroInProgress_JSON(t *testing.T) {
607 tmpDir := t.TempDir()

Callers

nothing calls this directly

Calls 2

resetStatusFlagsFunction · 0.85

Tested by

no test coverage detected