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

Function TestStatus_NoArgs_JSON

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

Source from the content-addressed store, hash-verified

875}
876
877func TestStatus_NoArgs_JSON(t *testing.T) {
878 tmpDir := createStatusTestFilesMultipleInProgress(t)
879 resetStatusFlags()
880 taskDir = tmpDir
881 statusFormat = "json"
882
883 output, err := captureStatusNoArgsOutput(t)
884 if err != nil {
885 t.Fatalf("unexpected error: %v", err)
886 }
887
888 var results []statusOutput
889 if err := json.Unmarshal([]byte(output), &results); err != nil {
890 t.Fatalf("Failed to parse JSON array: %v\nOutput: %s", err, output)
891 }
892
893 if len(results) != 2 {
894 t.Errorf("Expected 2 results, got %d", len(results))
895 }
896}
897
898func TestStatus_Blocked(t *testing.T) {
899 tmpDir := createStatusTestFiles(t)

Callers

nothing calls this directly

Calls 3

resetStatusFlagsFunction · 0.85

Tested by

no test coverage detected