From f58d4ba696a6dd706cbbc2b11751727426fd67f0 Mon Sep 17 00:00:00 2001 From: Jarrod Whelan Date: Tue, 10 Feb 2026 10:59:47 -0800 Subject: [PATCH] test: tidy up and declutter test files for dense tool output --- packages/cli/src/test-utils/render.tsx | 7 +- .../messages/ToolGroupMessage.test.tsx | 54 ++- .../ToolGroupMessage.test.tsx.snap | 155 +++------ .../cli/src/ui/hooks/useGeminiStream.test.tsx | 316 ++++++++---------- 4 files changed, 202 insertions(+), 330 deletions(-) diff --git a/packages/cli/src/test-utils/render.tsx b/packages/cli/src/test-utils/render.tsx index 64fccf1b3e..9f413fafe8 100644 --- a/packages/cli/src/test-utils/render.tsx +++ b/packages/cli/src/test-utils/render.tsx @@ -403,7 +403,7 @@ export function renderHook( } export function renderHookWithProviders( - renderCallback: (props: Props) => Result, + renderCallback: (props: Props & { settings: LoadedSettings }) => Result, options: { initialProps?: Props; wrapper?: React.ComponentType<{ children: React.ReactNode }>; @@ -421,6 +421,7 @@ export function renderHookWithProviders( rerender: (props?: Props) => void; unmount: () => void; } { + const settings = options.settings ?? mockSettings; // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion const result = { current: undefined as unknown as Result }; @@ -432,7 +433,7 @@ export function renderHookWithProviders( const [, forceUpdate] = useState(0); setPropsFn = setProps; forceUpdateFn = () => forceUpdate((n) => n + 1); - result.current = renderCallback(props); + result.current = renderCallback({ ...props, settings }); return null; } @@ -446,7 +447,7 @@ export function renderHookWithProviders( {/* eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion */} , - options, + { ...options, settings }, ); }); diff --git a/packages/cli/src/ui/components/messages/ToolGroupMessage.test.tsx b/packages/cli/src/ui/components/messages/ToolGroupMessage.test.tsx index de0ca01c0d..5368684ea2 100644 --- a/packages/cli/src/ui/components/messages/ToolGroupMessage.test.tsx +++ b/packages/cli/src/ui/components/messages/ToolGroupMessage.test.tsx @@ -48,22 +48,13 @@ describe('', () => { enableEventDrivenScheduler: true, }); - const commonOptions = { - config: baseMockConfig, - settings: createMockSettings({ - ui: { - enableCompactToolOutput: false, - }, - }), - }; - describe('Golden Snapshots', () => { it('renders single successful tool call', () => { const toolCalls = [createToolCall()]; const { lastFrame, unmount } = renderWithProviders( , { - ...commonOptions, + config: baseMockConfig, uiState: { pendingHistoryItems: [{ type: 'tool_group', tools: toolCalls }], }, @@ -103,7 +94,6 @@ describe('', () => { const { lastFrame, unmount } = renderWithProviders( , { - ...commonOptions, config: mockConfig, uiState: { pendingHistoryItems: [{ type: 'tool_group', tools: toolCalls }], @@ -138,7 +128,6 @@ describe('', () => { const { lastFrame, unmount } = renderWithProviders( , { - ...commonOptions, config: mockConfig, uiState: { pendingHistoryItems: [{ type: 'tool_group', tools: toolCalls }], @@ -161,7 +150,7 @@ describe('', () => { const { lastFrame, unmount } = renderWithProviders( , { - ...commonOptions, + config: baseMockConfig, uiState: { pendingHistoryItems: [{ type: 'tool_group', tools: toolCalls }], }, @@ -201,7 +190,6 @@ describe('', () => { const { lastFrame, unmount } = renderWithProviders( , { - ...commonOptions, config: mockConfig, uiState: { pendingHistoryItems: [{ type: 'tool_group', tools: toolCalls }], @@ -235,7 +223,7 @@ describe('', () => { availableTerminalHeight={10} />, { - ...commonOptions, + config: baseMockConfig, uiState: { pendingHistoryItems: [{ type: 'tool_group', tools: toolCalls }], }, @@ -254,7 +242,7 @@ describe('', () => { isFocused={false} />, { - ...commonOptions, + config: baseMockConfig, uiState: { pendingHistoryItems: [{ type: 'tool_group', tools: toolCalls }], }, @@ -279,7 +267,7 @@ describe('', () => { terminalWidth={40} />, { - ...commonOptions, + config: baseMockConfig, uiState: { pendingHistoryItems: [{ type: 'tool_group', tools: toolCalls }], }, @@ -293,7 +281,7 @@ describe('', () => { const { lastFrame, unmount } = renderWithProviders( , { - ...commonOptions, + config: baseMockConfig, uiState: { pendingHistoryItems: [{ type: 'tool_group', tools: [] }], }, @@ -324,7 +312,7 @@ describe('', () => { , { - ...commonOptions, + config: baseMockConfig, uiState: { pendingHistoryItems: [{ type: 'tool_group', tools: toolCalls }], }, @@ -347,7 +335,7 @@ describe('', () => { const { lastFrame, unmount } = renderWithProviders( , { - ...commonOptions, + config: baseMockConfig, uiState: { pendingHistoryItems: [{ type: 'tool_group', tools: toolCalls }], }, @@ -381,7 +369,7 @@ describe('', () => { , { - ...commonOptions, + config: baseMockConfig, uiState: { pendingHistoryItems: [ { type: 'tool_group', tools: toolCalls1 }, @@ -407,7 +395,6 @@ describe('', () => { const { lastFrame, unmount } = renderWithProviders( , { - ...commonOptions, config: mockConfig, uiState: { pendingHistoryItems: [{ type: 'tool_group', tools: toolCalls }], @@ -429,7 +416,7 @@ describe('', () => { const { lastFrame, unmount } = renderWithProviders( , { - ...commonOptions, + config: baseMockConfig, uiState: { pendingHistoryItems: [{ type: 'tool_group', tools: toolCalls }], }, @@ -451,7 +438,7 @@ describe('', () => { const { lastFrame, unmount } = renderWithProviders( , { - ...commonOptions, + config: baseMockConfig, uiState: { pendingHistoryItems: [{ type: 'tool_group', tools: toolCalls }], }, @@ -485,7 +472,7 @@ describe('', () => { availableTerminalHeight={20} />, { - ...commonOptions, + config: baseMockConfig, uiState: { pendingHistoryItems: [{ type: 'tool_group', tools: toolCalls }], }, @@ -531,7 +518,6 @@ describe('', () => { const { lastFrame, unmount } = renderWithProviders( , { - ...commonOptions, config: mockConfig, uiState: { pendingHistoryItems: [{ type: 'tool_group', tools: toolCalls }], @@ -558,7 +544,6 @@ describe('', () => { }), ]; const settings = createMockSettings({ - ui: { enableCompactToolOutput: false }, security: { enablePermanentToolApproval: true }, }); const mockConfig = makeFakeConfig({ @@ -570,7 +555,6 @@ describe('', () => { const { lastFrame, unmount } = renderWithProviders( , { - ...commonOptions, settings, config: mockConfig, uiState: { @@ -606,7 +590,7 @@ describe('', () => { const { lastFrame, unmount } = renderWithProviders( , - { ...commonOptions, config: mockConfig }, + { config: mockConfig }, ); expect(lastFrame()).not.toContain('Allow for all future sessions'); expect(lastFrame()).toMatchSnapshot(); @@ -633,7 +617,7 @@ describe('', () => { const { lastFrame, unmount } = renderWithProviders( , - { ...commonOptions, config: mockConfig }, + { config: mockConfig }, ); // Should render nothing because all tools in the group are confirming @@ -666,7 +650,7 @@ describe('', () => { const { lastFrame, unmount } = renderWithProviders( , - { ...commonOptions, config: mockConfig }, + { config: mockConfig }, ); const output = lastFrame(); @@ -695,7 +679,7 @@ describe('', () => { toolCalls={toolCalls} borderBottom={false} />, - { ...commonOptions, config: baseMockConfig }, + { config: baseMockConfig }, ); // AskUser tools in progress are rendered by AskUserDialog, so we expect nothing. expect(lastFrame()).toMatchSnapshot(); @@ -719,7 +703,7 @@ describe('', () => { const { lastFrame, unmount } = renderWithProviders( , - { ...commonOptions, config: baseMockConfig }, + { config: baseMockConfig }, ); expect(lastFrame()).toMatchSnapshot(); @@ -739,7 +723,7 @@ describe('', () => { const { lastFrame, unmount } = renderWithProviders( , - { ...commonOptions, config: baseMockConfig }, + { config: baseMockConfig }, ); expect(lastFrame()).toMatchSnapshot(); @@ -763,7 +747,7 @@ describe('', () => { const { lastFrame, unmount } = renderWithProviders( , - { ...commonOptions, config: baseMockConfig }, + { config: baseMockConfig }, ); expect(lastFrame()).toMatchSnapshot(); diff --git a/packages/cli/src/ui/components/messages/__snapshots__/ToolGroupMessage.test.tsx.snap b/packages/cli/src/ui/components/messages/__snapshots__/ToolGroupMessage.test.tsx.snap index f7d5eabfdb..1908088f75 100644 --- a/packages/cli/src/ui/components/messages/__snapshots__/ToolGroupMessage.test.tsx.snap +++ b/packages/cli/src/ui/components/messages/__snapshots__/ToolGroupMessage.test.tsx.snap @@ -1,20 +1,12 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[` > Ask User Filtering > does NOT filter out ask_user when status is Error 1`] = ` -"╭──────────────────────────────────────────────────────────────────────────╮ -│ x Ask User │ -│ │ -│ Test result │ -╰──────────────────────────────────────────────────────────────────────────╯ +" x Ask User A tool for testing → Test result " `; exports[` > Ask User Filtering > does NOT filter out ask_user when status is Success 1`] = ` -"╭──────────────────────────────────────────────────────────────────────────╮ -│ ✓ Ask User │ -│ │ -│ Test result │ -╰──────────────────────────────────────────────────────────────────────────╯ +" ✓ Ask User A tool for testing → Test result " `; @@ -25,24 +17,13 @@ exports[` > Ask User Filtering > filters out ask_user when s exports[` > Ask User Filtering > filters out ask_user when status is Pending 1`] = `""`; exports[` > Ask User Filtering > shows other tools when ask_user is filtered out 1`] = ` -"╭──────────────────────────────────────────────────────────────────────────╮ -│ ✓ other-tool A tool for testing │ -│ │ -│ Test result │ -╰──────────────────────────────────────────────────────────────────────────╯ +" ✓ other-tool A tool for testing → Test result " `; exports[` > Border Color Logic > uses gray border when all tools are successful and no shell commands 1`] = ` -"╭──────────────────────────────────────────────────────────────────────────╮ -│ ✓ test-tool A tool for testing │ -│ │ -│ Test result │ -│ │ -│ ✓ another-tool A tool for testing │ -│ │ -│ Test result │ -╰──────────────────────────────────────────────────────────────────────────╯ +" ✓ test-tool A tool for testing → Test result + ✓ another-tool A tool for testing → Test result " `; @@ -55,14 +36,7 @@ exports[` > Border Color Logic > uses yellow border for shel " `; -exports[` > Border Color Logic > uses yellow border when tools are pending 1`] = ` -"╭──────────────────────────────────────────────────────────────────────────╮ -│ o test-tool A tool for testing │ -│ │ -│ Test result │ -╰──────────────────────────────────────────────────────────────────────────╯ -" -`; +exports[` > Border Color Logic > uses yellow border when tools are pending 1`] = `""`; exports[` > Confirmation Handling > renders confirmation with permanent approval disabled 1`] = ` "╭──────────────────────────────────────────────────────────────────────────╮ @@ -122,60 +96,38 @@ exports[` > Event-Driven Scheduler > hides confirming tools exports[` > Event-Driven Scheduler > renders nothing when only tool is in-progress AskUser with borderBottom=false 1`] = `""`; exports[` > Event-Driven Scheduler > shows only successful tools when mixed with confirming tools 1`] = ` -"╭──────────────────────────────────────────────────────────────────────────╮ -│ ✓ success-tool A tool for testing │ -│ │ -│ Test result │ -╰──────────────────────────────────────────────────────────────────────────╯ +" ✓ success-tool A tool for testing → Test result " `; exports[` > Golden Snapshots > renders empty tool calls array 1`] = `""`; exports[` > Golden Snapshots > renders header when scrolled 1`] = ` -"╭──────────────────────────────────────────────────────────────────────────╮ -│ ✓ tool-1 Description 1. This is a long description that will need to b… │ -│──────────────────────────────────────────────────────────────────────────│ -│ │ ▄ -│ ✓ tool-2 Description 2 │ █ -│ │ █ -│ line1 │ █ -│ line2 │ █ -╰──────────────────────────────────────────────────────────────────────────╯ █ - █" +" ✓ tool-1 + Description 1. This is a long description that will need to be truncate… + → line1 line2 line3 line4 line5 + ✓ tool-2 Description 2 → line1 line2 + + + + + +" `; exports[` > Golden Snapshots > renders mixed tool calls including shell command 1`] = ` -"╭──────────────────────────────────────────────────────────────────────────╮ -│ ✓ read_file Read a file │ -│ │ -│ Test result │ +" ✓ read_file Read a file → Test result │ │ │ ⊷ run_shell_command Run command │ │ │ │ Test result │ -│ │ -│ o write_file Write to file │ -│ │ -│ Test result │ ╰──────────────────────────────────────────────────────────────────────────╯ " `; exports[` > Golden Snapshots > renders multiple tool calls with different statuses 1`] = ` -"╭──────────────────────────────────────────────────────────────────────────╮ -│ ✓ successful-tool This tool succeeded │ -│ │ -│ Test result │ -│ │ -│ o pending-tool This tool is pending │ -│ │ -│ Test result │ -│ │ -│ x error-tool This tool failed │ -│ │ -│ Test result │ -╰──────────────────────────────────────────────────────────────────────────╯ +" ✓ successful-tool This tool succeeded → Test result + x error-tool This tool failed → Test result " `; @@ -189,11 +141,7 @@ exports[` > Golden Snapshots > renders shell command with ye `; exports[` > Golden Snapshots > renders single successful tool call 1`] = ` -"╭──────────────────────────────────────────────────────────────────────────╮ -│ ✓ test-tool A tool for testing │ -│ │ -│ Test result │ -╰──────────────────────────────────────────────────────────────────────────╯ +" ✓ test-tool A tool for testing → Test result " `; @@ -214,67 +162,42 @@ exports[` > Golden Snapshots > renders tool call awaiting co `; exports[` > Golden Snapshots > renders tool call with outputFile 1`] = ` -"╭──────────────────────────────────────────────────────────────────────────╮ -│ ✓ tool-with-file Tool that saved output to file │ -│ │ -│ Test result │ -│ Output too long and was saved to: /path/to/output.txt │ -╰──────────────────────────────────────────────────────────────────────────╯ +" ✓ tool-with-file Tool that saved output to file → Test result + (Output saved to: /path/to/output.txt) " `; exports[` > Golden Snapshots > renders two tool groups where only the last line of the previous group is visible 1`] = ` -"╭──────────────────────────────────────────────────────────────────────────╮ -│ ✓ tool-2 Description 2 │ -│ │ -│ line1 │ ▄ -╰──────────────────────────────────────────────────────────────────────────╯ █ - █" +" ✓ tool-1 Description 1 → line1 line2 line3 line4 line5 + + ✓ tool-2 Description 2 → line1 + + +" `; exports[` > Golden Snapshots > renders when not focused 1`] = ` -"╭──────────────────────────────────────────────────────────────────────────╮ -│ ✓ test-tool A tool for testing │ -│ │ -│ Test result │ -╰──────────────────────────────────────────────────────────────────────────╯ +" ✓ test-tool A tool for testing → Test result " `; exports[` > Golden Snapshots > renders with limited terminal height 1`] = ` -"╭──────────────────────────────────────────────────────────────────────────╮ -│ ✓ tool-with-result Tool with output │ -│ │ -│ This is a long result that might need height constraints │ -│ │ -│ ✓ another-tool Another tool │ -│ │ -│ More output here │ -╰──────────────────────────────────────────────────────────────────────────╯ +" ✓ tool-with-result Tool with output + → This is a long result that might need height constraints + ✓ another-tool Another tool → More output here " `; exports[` > Golden Snapshots > renders with narrow terminal width 1`] = ` -"╭──────────────────────────────────╮ -│ ✓ very-long-tool-name-that-mig… │ -│ │ -│ Test result │ -╰──────────────────────────────────╯ +" ✓ very-long-tool-name-that… + This is a very long description… + → Test result " `; exports[` > Height Calculation > calculates available height correctly with multiple tools with results 1`] = ` -"╭──────────────────────────────────────────────────────────────────────────╮ -│ ✓ test-tool A tool for testing │ -│ │ -│ Result 1 │ -│ │ -│ ✓ test-tool A tool for testing │ -│ │ -│ Result 2 │ -│ │ -│ ✓ test-tool A tool for testing │ -│ │ -╰──────────────────────────────────────────────────────────────────────────╯ +" ✓ test-tool A tool for testing → Result 1 + ✓ test-tool A tool for testing → Result 2 + ✓ test-tool A tool for testing " `; diff --git a/packages/cli/src/ui/hooks/useGeminiStream.test.tsx b/packages/cli/src/ui/hooks/useGeminiStream.test.tsx index fcf0d1e360..caea09beff 100644 --- a/packages/cli/src/ui/hooks/useGeminiStream.test.tsx +++ b/packages/cli/src/ui/hooks/useGeminiStream.test.tsx @@ -9,7 +9,6 @@ import type { Mock, MockInstance } from 'vitest'; import { describe, it, expect, vi, beforeEach } from 'vitest'; import { act } from 'react'; import { renderHookWithProviders } from '../../test-utils/render.js'; -import { createMockSettings } from '../../test-utils/settings.js'; import { waitFor } from '../../test-utils/async.js'; import { useGeminiStream } from './useGeminiStream.js'; import { useKeypress } from './useKeypress.js'; @@ -307,12 +306,6 @@ describe('useGeminiStream', () => { setValue: vi.fn(), } as unknown as LoadedSettings; - const commonSettings = createMockSettings({ - ui: { - enableCompactToolOutput: true, - }, - }); - const renderTestHook = ( initialToolCalls: TrackedToolCall[] = [], geminiClient?: any, @@ -396,7 +389,6 @@ describe('useGeminiStream', () => { ), { initialProps, - settings: commonSettings, }, ); return { @@ -476,30 +468,26 @@ describe('useGeminiStream', () => { modelSwitched = false, } = options; - return renderHookWithProviders( - () => - useGeminiStream( - new MockedGeminiClientClass(mockConfig), - [], - mockAddItem, - mockConfig, - mockLoadedSettings, - mockOnDebugMessage, - mockHandleSlashCommand, - shellModeActive, - () => 'vscode' as EditorType, - onAuthError, - performMemoryRefresh, - modelSwitched, - setModelSwitched, - onCancelSubmit, - setShellInputFocused, - 80, - 24, - ), - { - settings: commonSettings, - }, + return renderHookWithProviders(() => + useGeminiStream( + new MockedGeminiClientClass(mockConfig), + [], + mockAddItem, + mockConfig, + mockLoadedSettings, + mockOnDebugMessage, + mockHandleSlashCommand, + shellModeActive, + () => 'vscode' as EditorType, + onAuthError, + performMemoryRefresh, + modelSwitched, + setModelSwitched, + onCancelSubmit, + setShellInputFocused, + 80, + 24, + ), ); }; @@ -2040,30 +2028,26 @@ describe('useGeminiStream', () => { })(), ); - const { result } = renderHookWithProviders( - () => - useGeminiStream( - new MockedGeminiClientClass(mockConfig), - [], - mockAddItem, - mockConfig, - mockLoadedSettings, - mockOnDebugMessage, - mockHandleSlashCommand, - false, - () => 'vscode' as EditorType, - () => {}, - () => Promise.resolve(), - false, - () => {}, - () => {}, - () => {}, - 80, - 24, - ), - { - settings: commonSettings, - }, + const { result } = renderHookWithProviders(() => + useGeminiStream( + new MockedGeminiClientClass(mockConfig), + [], + mockAddItem, + mockConfig, + mockLoadedSettings, + mockOnDebugMessage, + mockHandleSlashCommand, + false, + () => 'vscode' as EditorType, + () => {}, + () => Promise.resolve(), + false, + () => {}, + () => {}, + () => {}, + 80, + 24, + ), ); // Submit a query @@ -2548,30 +2532,26 @@ describe('useGeminiStream', () => { })(), ); - const { result } = renderHookWithProviders( - () => - useGeminiStream( - new MockedGeminiClientClass(mockConfig), - [], - mockAddItem, - mockConfig, - mockLoadedSettings, - mockOnDebugMessage, - mockHandleSlashCommand, - false, - () => 'vscode' as EditorType, - () => {}, - () => Promise.resolve(), - false, - () => {}, - () => {}, - () => {}, - 80, - 24, - ), - { - settings: commonSettings, - }, + const { result } = renderHookWithProviders(() => + useGeminiStream( + new MockedGeminiClientClass(mockConfig), + [], + mockAddItem, + mockConfig, + mockLoadedSettings, + mockOnDebugMessage, + mockHandleSlashCommand, + false, + () => 'vscode' as EditorType, + () => {}, + () => Promise.resolve(), + false, + () => {}, + () => {}, + () => {}, + 80, + 24, + ), ); // Submit first query to set a thought @@ -2634,30 +2614,26 @@ describe('useGeminiStream', () => { 0, ]); - const { result, rerender } = renderHookWithProviders( - () => - useGeminiStream( - mockConfig.getGeminiClient(), - [], - mockAddItem, - mockConfig, - mockLoadedSettings, - mockOnDebugMessage, - mockHandleSlashCommand, - false, - () => 'vscode' as EditorType, - () => {}, - () => Promise.resolve(), - false, - () => {}, - () => {}, - () => {}, - 80, - 24, - ), - { - settings: commonSettings, - }, + const { result, rerender } = renderHookWithProviders(() => + useGeminiStream( + mockConfig.getGeminiClient(), + [], + mockAddItem, + mockConfig, + mockLoadedSettings, + mockOnDebugMessage, + mockHandleSlashCommand, + false, + () => 'vscode' as EditorType, + () => {}, + () => Promise.resolve(), + false, + () => {}, + () => {}, + () => {}, + 80, + 24, + ), ); const firstResult = result.current.pendingHistoryItems; @@ -2709,30 +2685,26 @@ describe('useGeminiStream', () => { })(), ); - const { result } = renderHookWithProviders( - () => - useGeminiStream( - new MockedGeminiClientClass(mockConfig), - [], - mockAddItem, - mockConfig, - mockLoadedSettings, - mockOnDebugMessage, - mockHandleSlashCommand, - false, - () => 'vscode' as EditorType, - () => {}, - () => Promise.resolve(), - false, - () => {}, - () => {}, - () => {}, - 80, - 24, - ), - { - settings: commonSettings, - }, + const { result } = renderHookWithProviders(() => + useGeminiStream( + new MockedGeminiClientClass(mockConfig), + [], + mockAddItem, + mockConfig, + mockLoadedSettings, + mockOnDebugMessage, + mockHandleSlashCommand, + false, + () => 'vscode' as EditorType, + () => {}, + () => Promise.resolve(), + false, + () => {}, + () => {}, + () => {}, + 80, + 24, + ), ); // Submit query @@ -2770,30 +2742,26 @@ describe('useGeminiStream', () => { })(), ); - const { result } = renderHookWithProviders( - () => - useGeminiStream( - new MockedGeminiClientClass(mockConfig), - [], - mockAddItem, - mockConfig, - mockLoadedSettings, - mockOnDebugMessage, - mockHandleSlashCommand, - false, - () => 'vscode' as EditorType, - () => {}, - () => Promise.resolve(), - false, - () => {}, - () => {}, - () => {}, - 80, - 24, - ), - { - settings: commonSettings, - }, + const { result } = renderHookWithProviders(() => + useGeminiStream( + new MockedGeminiClientClass(mockConfig), + [], + mockAddItem, + mockConfig, + mockLoadedSettings, + mockOnDebugMessage, + mockHandleSlashCommand, + false, + () => 'vscode' as EditorType, + () => {}, + () => Promise.resolve(), + false, + () => {}, + () => {}, + () => {}, + 80, + 24, + ), ); // Submit query @@ -2842,30 +2810,26 @@ describe('useGeminiStream', () => { })(), ); - const { result } = renderHookWithProviders( - () => - useGeminiStream( - new MockedGeminiClientClass(mockConfig), - [], - mockAddItem, - mockConfig, - mockLoadedSettings, - mockOnDebugMessage, - mockHandleSlashCommand, - false, - () => 'vscode' as EditorType, - () => {}, - () => Promise.resolve(), - false, - () => {}, - () => {}, - () => {}, - 80, - 24, - ), - { - settings: commonSettings, - }, + const { result } = renderHookWithProviders(() => + useGeminiStream( + new MockedGeminiClientClass(mockConfig), + [], + mockAddItem, + mockConfig, + mockLoadedSettings, + mockOnDebugMessage, + mockHandleSlashCommand, + false, + () => 'vscode' as EditorType, + () => {}, + () => Promise.resolve(), + false, + () => {}, + () => {}, + () => {}, + 80, + 24, + ), ); // Submit query