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

Function TestBuildTaskMap

apps/cli/internal/cli/snapshot_test.go:113–130  ·  view source on GitHub ↗

--- Analysis function tests (pure, no I/O) ---

(t *testing.T)

Source from the content-addressed store, hash-verified

111// --- Analysis function tests (pure, no I/O) ---
112
113func TestBuildTaskMap(t *testing.T) {
114 tasks := []*model.Task{
115 {ID: "001", Title: "A"},
116 {ID: "002", Title: "B"},
117 }
118
119 taskMap := buildTaskMap(tasks)
120
121 if len(taskMap) != 2 {
122 t.Fatalf("expected 2 entries, got %d", len(taskMap))
123 }
124 if taskMap["001"].Title != "A" {
125 t.Errorf("taskMap[001].Title = %q, want %q", taskMap["001"].Title, "A")
126 }
127 if taskMap["002"].Title != "B" {
128 t.Errorf("taskMap[002].Title = %q, want %q", taskMap["002"].Title, "B")
129 }
130}
131
132func TestIsTaskBlocked(t *testing.T) {
133 tasks := []*model.Task{

Callers

nothing calls this directly

Calls 1

buildTaskMapFunction · 0.85

Tested by

no test coverage detected