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

Function createContextTestFiles

apps/cli/internal/cli/context_test.go:16–117  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

14)
15
16func createContextTestFiles(t *testing.T) string {
17 t.Helper()
18 tmpDir := t.TempDir()
19
20 tasks := map[string]string{
21 "001-touches.md": `---
22id: "001"
23title: "Task with touches"
24status: pending
25touches:
26 - cli
27created: 2026-02-14
28---
29
30# Task with touches
31`,
32 "002-context.md": `---
33id: "002"
34title: "Task with context"
35status: pending
36context:
37 - "docs/readme.md"
38created: 2026-02-14
39---
40
41# Task with context
42
43Some body text here.
44`,
45 "003-both.md": `---
46id: "003"
47title: "Task with both"
48status: pending
49touches:
50 - cli
51context:
52 - "docs/readme.md"
53created: 2026-02-14
54---
55
56# Task with both
57`,
58 "004-deps.md": `---
59id: "004"
60title: "Task with deps"
61status: pending
62dependencies: ["001"]
63context:
64 - "docs/notes.md"
65created: 2026-02-14
66---
67
68# Task with deps
69`,
70 "005-empty.md": `---
71id: "005"
72title: "Task with nothing"
73status: pending

Callers 14

TestContext_TouchesOnlyFunction · 0.85
TestContext_ExplicitOnlyFunction · 0.85
TestContext_BothSourcesFunction · 0.85
TestContext_EmptyTaskFunction · 0.85
TestContext_TaskNotFoundFunction · 0.85
TestContext_MissingFilesFunction · 0.85
TestContext_JSONFunction · 0.85
TestContext_YAMLFunction · 0.85
TestContext_IncludeDepsFunction · 0.85
TestContext_MaxFilesFunction · 0.85

Calls 1

createDirAndFileFunction · 0.85

Tested by

no test coverage detected