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

Function TestTracks_BlockedExcluded

apps/cli/internal/cli/tracks_test.go:276–304  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

274}
275
276func TestTracks_BlockedExcluded(t *testing.T) {
277 tmpDir := createTracksTestTaskFiles(t)
278 resetTracksFlags()
279 tracksFormat = "json"
280
281 output, err := captureTracksOutput(t, []string{tmpDir})
282 if err != nil {
283 t.Fatalf("runTracks failed: %v", err)
284 }
285
286 var result tracks.Result
287 if err := json.Unmarshal([]byte(output), &result); err != nil {
288 t.Fatalf("Failed to parse JSON: %v", err)
289 }
290
291 // Task 006 depends on 007 (pending) -> blocked.
292 for _, track := range result.Tracks {
293 for _, task := range track.Tasks {
294 if task.ID == "006" {
295 t.Error("Blocked task 006 should not appear in tracks")
296 }
297 }
298 }
299 for _, task := range result.Flexible {
300 if task.ID == "006" {
301 t.Error("Blocked task 006 should not appear in flexible")
302 }
303 }
304}
305
306func TestTracks_FlexibleTasks(t *testing.T) {
307 tmpDir := createTracksTestTaskFiles(t)

Callers

nothing calls this directly

Calls 4

resetTracksFlagsFunction · 0.85
captureTracksOutputFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected