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

Function TestAdd_EmptyDirectory

apps/cli/internal/cli/add_test.go:287–300  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

285}
286
287func TestAdd_EmptyDirectory(t *testing.T) {
288 tmpDir := t.TempDir()
289 resetAddFlags()
290 taskDir = tmpDir
291
292 output, err := captureAddOutput(t, "First task ever")
293 if err != nil {
294 t.Fatalf("unexpected error: %v", err)
295 }
296
297 if !strings.Contains(output, "Created task 001") {
298 t.Errorf("expected ID 001 for first task, got: %s", output)
299 }
300}
301
302func TestAdd_SequentialIDs(t *testing.T) {
303 tmpDir := t.TempDir()

Callers

nothing calls this directly

Calls 2

resetAddFlagsFunction · 0.85
captureAddOutputFunction · 0.85

Tested by

no test coverage detected