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

Function createTestTaskFiles

apps/cli/internal/cli/graph_test.go:13–104  ·  view source on GitHub ↗

createTestTaskFiles creates test task files in a temp directory

(t *testing.T)

Source from the content-addressed store, hash-verified

11
12// createTestTaskFiles creates test task files in a temp directory
13func createTestTaskFiles(t *testing.T) string {
14 t.Helper()
15
16 tmpDir := t.TempDir()
17
18 tasks := map[string]string{
19 "001-root-task.md": `---
20id: "001"
21title: "Root Task"
22status: completed
23priority: high
24effort: small
25dependencies: []
26tags: ["test"]
27created: 2026-02-08
28---
29
30# Root Task
31
32A completed root task.
33`,
34 "002-depends-on-001.md": `---
35id: "002"
36title: "Depends on 001"
37status: completed
38priority: medium
39effort: medium
40dependencies: ["001"]
41tags: ["test"]
42created: 2026-02-08
43---
44
45# Depends on 001
46
47A completed task that depends on 001.
48`,
49 "003-depends-on-002.md": `---
50id: "003"
51title: "Depends on 002"
52status: pending
53priority: high
54effort: small
55dependencies: ["002"]
56tags: ["test"]
57created: 2026-02-08
58---
59
60# Depends on 002
61
62A pending task that depends on completed task 002.
63`,
64 "004-depends-on-001-002.md": `---
65id: "004"
66title: "Depends on 001 and 002"
67status: pending
68priority: low
69effort: large
70dependencies: ["001", "002"]

Calls

no outgoing calls

Tested by

no test coverage detected