(t *testing.T)
| 180 | } |
| 181 | |
| 182 | func TestAdvisorToolRejectsEmptyQuestion(t *testing.T) { |
| 183 | t.Parallel() |
| 184 | |
| 185 | tool := chatadvisor.Tool(chatadvisor.ToolOptions{ |
| 186 | Runtime: mustAdvisorRuntime(t), |
| 187 | GetConversationSnapshot: func() []fantasy.Message { |
| 188 | return nil |
| 189 | }, |
| 190 | }) |
| 191 | |
| 192 | resp := runAdvisorTool(t, tool, chatadvisor.AdvisorArgs{Question: " \t\n "}) |
| 193 | require.True(t, resp.IsError) |
| 194 | require.Contains(t, resp.Content, "question is required") |
| 195 | } |
| 196 | |
| 197 | func TestAdvisorToolPassesNormalQuestion(t *testing.T) { |
| 198 | t.Parallel() |
nothing calls this directly
no test coverage detected