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

Function createWorklogFile

apps/cli/internal/web/handlers_test.go:1111–1120  ·  view source on GitHub ↗

GET /api/tasks/{id}/worklog tests

(t *testing.T, dir, taskID, content string)

Source from the content-addressed store, hash-verified

1109// GET /api/tasks/{id}/worklog tests
1110
1111func createWorklogFile(t *testing.T, dir, taskID, content string) {
1112 t.Helper()
1113 wlDir := filepath.Join(dir, ".worklogs")
1114 if err := os.MkdirAll(wlDir, 0755); err != nil {
1115 t.Fatalf("failed to create worklogs dir: %v", err)
1116 }
1117 if err := os.WriteFile(filepath.Join(wlDir, taskID+".md"), []byte(content), 0644); err != nil {
1118 t.Fatalf("failed to write worklog file: %v", err)
1119 }
1120}
1121
1122func TestHandleWorklog_NoWorklog(t *testing.T) {
1123 dir := createTestTaskDir(t)

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected