Test: Add comprehensive tests for useToolScheduler hook

- Introduces a suite of tests for the  hook, covering various scenarios including:
  - Successful tool execution
  - Tool not found errors
  - Errors during
  - Errors during tool execution
  - Tool confirmation (approved and cancelled) - (currently skipped)
  - Live output updates - (currently skipped)
  - Cancellation of tool calls (before execution and during approval) - (currently skipped)
  - Execution of multiple tool calls
  - Preventing scheduling while other calls are running - (currently skipped)
- Includes tests for the  utility function to ensure correct mapping of tool call states to display objects.
- Mocks dependencies like , , and individual  instances.
- Uses fake timers to control asynchronous operations.

Note: Some tests involving complex asynchronous interactions (confirmations, live output, cancellations) are currently skipped due to challenges in reliably testing these scenarios with the current setup. These will be addressed in future work.
This commit is contained in:
Taylor Mullen 2025-05-31 02:51:16 -07:00 committed by N. Taylor Mullen
parent ae8e2106bb
commit 1a84d8f674
1 changed files with 1028 additions and 7 deletions

File diff suppressed because it is too large Load Diff