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