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

Function createSnapshotTestFiles

apps/cli/internal/cli/snapshot_test.go:24–91  ·  view source on GitHub ↗

createSnapshotTestFiles creates test task files with dependencies for snapshot tests.

(t *testing.T)

Source from the content-addressed store, hash-verified

22
23// createSnapshotTestFiles creates test task files with dependencies for snapshot tests.
24func createSnapshotTestFiles(t *testing.T) string {
25 t.Helper()
26 tmpDir := t.TempDir()
27
28 tasks := map[string]string{
29 "001-root.md": `---
30id: "001"
31title: "Root Task"
32status: completed
33priority: high
34effort: small
35dependencies: []
36tags: ["core"]
37created: 2026-02-08
38---
39
40Root task.
41`,
42 "002-depends-on-001.md": `---
43id: "002"
44title: "Middle Task"
45status: pending
46priority: medium
47effort: medium
48dependencies: ["001"]
49tags: ["core"]
50created: 2026-02-08
51---
52
53Depends on 001.
54`,
55 "003-depends-on-002.md": `---
56id: "003"
57title: "Leaf Task"
58status: pending
59priority: low
60effort: large
61dependencies: ["002"]
62tags: ["extra"]
63group: "backend"
64created: 2026-02-08
65---
66
67Depends on 002, forming a chain 001 -> 002 -> 003.
68`,
69 "004-no-deps.md": `---
70id: "004"
71title: "Independent Task"
72status: pending
73priority: high
74effort: small
75dependencies: []
76tags: []
77created: 2026-02-08
78---
79
80No dependencies.
81`,

Calls

no outgoing calls

Tested by

no test coverage detected