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

Function createTestTaskDir

apps/cli/internal/web/handlers_test.go:21–52  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

19)
20
21func createTestTaskDir(t *testing.T) string {
22 t.Helper()
23 dir := t.TempDir()
24
25 task1 := `---
26id: "001"
27title: "Task One"
28status: pending
29priority: high
30effort: small
31tags:
32 - setup
33---
34# Task One
35`
36 task2 := `---
37id: "002"
38title: "Task Two"
39status: in-progress
40priority: medium
41effort: medium
42dependencies:
43 - "001"
44tags:
45 - core
46---
47# Task Two
48`
49 os.WriteFile(filepath.Join(dir, "001-task-one.md"), []byte(task1), 0644)
50 os.WriteFile(filepath.Join(dir, "002-task-two.md"), []byte(task2), 0644)
51 return dir
52}
53
54func TestHandleTasks(t *testing.T) {
55 dir := createTestTaskDir(t)

Callers 15

TestHandleTasksFunction · 0.85
TestHandleBoardFunction · 0.85
TestHandleGraphFunction · 0.85
TestHandleGraphMermaidFunction · 0.85
TestHandleStatsFunction · 0.85
TestHandleValidateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected