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

Function TestStatus_ChildrenTree

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

Source from the content-addressed store, hash-verified

359}
360
361func TestStatus_ChildrenTree(t *testing.T) {
362 tmpDir := createStatusTestFilesWithChildren(t)
363 resetStatusFlags()
364 taskDir = tmpDir
365
366 output := captureStatusOutput(t, "010")
367
368 if !strings.Contains(output, "Children:") {
369 t.Error("Expected output to contain 'Children:' section")
370 }
371 if !strings.Contains(output, "011") {
372 t.Error("Expected output to contain child ID '011'")
373 }
374 if !strings.Contains(output, "Child A") {
375 t.Error("Expected output to contain child title 'Child A'")
376 }
377 if !strings.Contains(output, "012") {
378 t.Error("Expected output to contain child ID '012'")
379 }
380 if !strings.Contains(output, "Child B") {
381 t.Error("Expected output to contain child title 'Child B'")
382 }
383 if !strings.Contains(output, "013") {
384 t.Error("Expected output to contain grandchild ID '013'")
385 }
386 if !strings.Contains(output, "Grandchild") {
387 t.Error("Expected output to contain grandchild title 'Grandchild'")
388 }
389}
390
391func TestStatus_ChildrenTree_JSON(t *testing.T) {
392 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