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

Function TestNext_LimitExceedsAvailable

apps/cli/internal/cli/next_test.go:370–391  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

368}
369
370func TestNext_LimitExceedsAvailable(t *testing.T) {
371 tmpDir := createNextTestTaskFiles(t)
372
373 resetNextFlags()
374 nextFormat = "json"
375 nextLimit = 100
376
377 output, err := captureNextOutput(t, []string{tmpDir})
378 if err != nil {
379 t.Fatalf("runNext failed: %v", err)
380 }
381
382 var recs []Recommendation
383 if err := json.Unmarshal([]byte(output), &recs); err != nil {
384 t.Fatalf("Failed to parse JSON: %v", err)
385 }
386
387 // Should return all 5 actionable tasks, not error
388 if len(recs) != 5 {
389 t.Errorf("Expected 5 recommendations (all actionable), got %d", len(recs))
390 }
391}
392
393func TestNext_FilterByTag(t *testing.T) {
394 tmpDir := createNextTestTaskFiles(t)

Callers

nothing calls this directly

Calls 3

createNextTestTaskFilesFunction · 0.85
resetNextFlagsFunction · 0.85
captureNextOutputFunction · 0.85

Tested by

no test coverage detected