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

Function TestStatus_MinimalFlag_JSON

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

Source from the content-addressed store, hash-verified

477}
478
479func TestStatus_MinimalFlag_JSON(t *testing.T) {
480 tmpDir := createStatusTestFilesWithChildren(t)
481 resetStatusFlags()
482 taskDir = tmpDir
483 statusMinimal = true
484 statusFormat = "json"
485
486 output := captureStatusOutput(t, "010")
487
488 var raw map[string]any
489 if err := json.Unmarshal([]byte(output), &raw); err != nil {
490 t.Fatalf("Failed to parse JSON: %v", err)
491 }
492 if _, ok := raw["children"]; ok {
493 t.Error("--minimal JSON output should not contain 'children' key")
494 }
495}
496
497func TestStatus_NoChildren(t *testing.T) {
498 tmpDir := createStatusTestFilesWithChildren(t)

Callers

nothing calls this directly

Calls 4

resetStatusFlagsFunction · 0.85
captureStatusOutputFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected