qwen-code/packages/cli/src/ui/hooks
Taylor Mullen 1a84d8f674 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.
2025-05-31 02:55:36 -07:00
..
atCommandProcessor.test.ts Rename server->core (#638) 2025-05-30 18:25:47 -07:00
atCommandProcessor.ts Rename server->core (#638) 2025-05-30 18:25:47 -07:00
shellCommandProcessor.test.ts Rename server->core (#638) 2025-05-30 18:25:47 -07:00
shellCommandProcessor.ts Rename server->core (#638) 2025-05-30 18:25:47 -07:00
slashCommandProcessor.test.ts Rename server->core (#638) 2025-05-30 18:25:47 -07:00
slashCommandProcessor.ts Rename server->core (#638) 2025-05-30 18:25:47 -07:00
useAutoAcceptIndicator.test.ts Rename server->core (#638) 2025-05-30 18:25:47 -07:00
useAutoAcceptIndicator.ts Rename server->core (#638) 2025-05-30 18:25:47 -07:00
useCompletion.ts Rename server->core (#638) 2025-05-30 18:25:47 -07:00
useConsoleMessages.test.ts Make console message support more robust to logging in the middle of rendering. (#521) 2025-05-23 22:51:47 -07:00
useConsoleMessages.ts Make console message support more robust to logging in the middle of rendering. (#521) 2025-05-23 22:51:47 -07:00
useGeminiStream.test.tsx Refactor read-file and support images. (#480) 2025-05-29 15:30:18 -07:00
useGeminiStream.ts Rename server->core (#638) 2025-05-30 18:25:47 -07:00
useGitBranchName.test.ts feat: add git branch name to footer (#589) 2025-05-28 16:30:05 -07:00
useGitBranchName.ts Fix: Update git branch watcher to use .git/logs/HEAD (#643) 2025-05-30 21:08:56 -07:00
useHistoryManager.test.ts refactor(cli): Centralize history management via useHistoryManager hook (#261) 2025-05-06 16:20:28 -07:00
useHistoryManager.ts Fix flicker in iterm2 (#266) 2025-05-07 12:57:19 -07:00
useInputHistory.test.ts Fix bug updating the cursor after navigating history. (#507) 2025-05-23 09:40:01 -07:00
useInputHistory.ts Fix bug updating the cursor after navigating history. (#507) 2025-05-23 09:40:01 -07:00
useLoadingIndicator.test.ts Code review comment fixes and some refactors. (#525) 2025-05-24 00:44:17 -07:00
useLoadingIndicator.ts Code review comment fixes and some refactors. (#525) 2025-05-24 00:44:17 -07:00
useLogger.ts Rename server->core (#638) 2025-05-30 18:25:47 -07:00
usePhraseCycler.test.ts Code review comment fixes and some refactors. (#525) 2025-05-24 00:44:17 -07:00
usePhraseCycler.ts Code review comment fixes and some refactors. (#525) 2025-05-24 00:44:17 -07:00
useRefreshMemoryCommand.ts This commit introduces the hierarchical memory feature, allowing GEMI… (#327) 2025-05-14 12:37:17 -07:00
useShowMemoryCommand.ts Rename server->core (#638) 2025-05-30 18:25:47 -07:00
useStateAndRef.ts Fix flicker in iterm2 (#266) 2025-05-07 12:57:19 -07:00
useTerminalSize.ts Multiline editor (#302) 2025-05-13 11:24:04 -07:00
useThemeCommand.ts feat: Improve theme not found handling 2025-05-09 10:28:20 -07:00
useTimer.test.ts Code review comment fixes and some refactors. (#525) 2025-05-24 00:44:17 -07:00
useTimer.ts Code review comment fixes and some refactors. (#525) 2025-05-24 00:44:17 -07:00
useToolScheduler.test.ts Test: Add comprehensive tests for useToolScheduler hook 2025-05-31 02:55:36 -07:00
useToolScheduler.ts Rename server->core (#638) 2025-05-30 18:25:47 -07:00