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

Function TestParseTaskContent_Phase

sdk/go/parser/markdown_test.go:84–105  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

82}
83
84func TestParseTaskContent_Phase(t *testing.T) {
85 content := []byte(`---
86id: "050"
87title: "Phase Task"
88status: pending
89phase: "v0.2"
90---
91
92# Phase Task
93
94A task with a phase.
95`)
96
97 task, err := ParseTaskContent("test.md", content)
98 if err != nil {
99 t.Fatalf("expected no error, got: %v", err)
100 }
101
102 if task.Phase != "v0.2" {
103 t.Errorf("expected phase 'v0.2', got '%s'", task.Phase)
104 }
105}
106
107func TestParseTaskContent_NoPhase(t *testing.T) {
108 content := []byte(`---

Callers

nothing calls this directly

Calls 1

ParseTaskContentFunction · 0.85

Tested by

no test coverage detected