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

Function TestNext_YAMLFormat

apps/cli/internal/cli/next_test.go:558–580  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

556}
557
558func TestNext_YAMLFormat(t *testing.T) {
559 tmpDir := createNextTestTaskFiles(t)
560
561 resetNextFlags()
562 nextFormat = "yaml"
563 nextLimit = 2
564
565 output, err := captureNextOutput(t, []string{tmpDir})
566 if err != nil {
567 t.Fatalf("runNext failed: %v", err)
568 }
569
570 // Basic YAML structure check
571 if !strings.Contains(output, "rank:") {
572 t.Error("Expected YAML output to contain 'rank:'")
573 }
574 if !strings.Contains(output, "id:") {
575 t.Error("Expected YAML output to contain 'id:'")
576 }
577 if !strings.Contains(output, "reasons:") {
578 t.Error("Expected YAML output to contain 'reasons:'")
579 }
580}
581
582func TestNext_TableFormat(t *testing.T) {
583 tmpDir := createNextTestTaskFiles(t)

Callers

nothing calls this directly

Calls 4

createNextTestTaskFilesFunction · 0.85
resetNextFlagsFunction · 0.85
captureNextOutputFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected