(t *testing.T)
| 440 | } |
| 441 | |
| 442 | func TestHandleRun_InvalidSubAgent(t *testing.T) { |
| 443 | t.Parallel() |
| 444 | h := newTestHandlerWithRunner(&mockRunner{subAgentNames: []string{"sub"}}) |
| 445 | tc := makeToolCall(t, RunBackgroundAgentArgs{Agent: "nonexistent", Task: "do something"}) |
| 446 | result, err := h.HandleRun(t.Context(), session.New(), tc) |
| 447 | require.NoError(t, err) |
| 448 | assert.True(t, result.IsError) |
| 449 | assert.Contains(t, result.Output, "not in the sub-agents list") |
| 450 | } |
| 451 | |
| 452 | func TestHandleRun_NoSubAgents(t *testing.T) { |
| 453 | t.Parallel() |
nothing calls this directly
no test coverage detected