MCPcopy Create free account
hub / github.com/diillson/chatcli / TestTaskTracker_MarkCurrentAs

Function TestTaskTracker_MarkCurrentAs

cli/agent/task_tracker_test.go:45–67  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

43}
44
45func TestTaskTracker_MarkCurrentAs(t *testing.T) {
46 logger, _ := zap.NewDevelopment()
47 tracker := NewTaskTracker(logger)
48 reasoning := `1. Criar arquivo
492. Rodar teste`
50 _ = tracker.ParseReasoning(reasoning)
51 plan := tracker.GetPlan()
52 if plan == nil {
53 t.Fatal("Expected plan, got nil")
54 return
55 }
56 tracker.MarkCurrentAs(TaskInProgress, "")
57 if plan.Tasks[0].Status != TaskInProgress {
58 t.Error("Expected first task to be in progress")
59 }
60 tracker.MarkCurrentAs(TaskCompleted, "")
61 if plan.Tasks[0].Status != TaskCompleted {
62 t.Error("Expected first task to be completed")
63 }
64 if plan.CurrentTask != 1 {
65 t.Errorf("Expected current task to be 1, got %d", plan.CurrentTask)
66 }
67}
68
69func TestTaskTracker_FailureHandling(t *testing.T) {
70 logger, _ := zap.NewDevelopment()

Callers

nothing calls this directly

Calls 6

ParseReasoningMethod · 0.95
GetPlanMethod · 0.95
MarkCurrentAsMethod · 0.95
NewTaskTrackerFunction · 0.85
ErrorfMethod · 0.80
ErrorMethod · 0.65

Tested by

no test coverage detected