From e894e64ef117f528cb96712548509204211c5982 Mon Sep 17 00:00:00 2001 From: mkorwel Date: Mon, 20 Apr 2026 21:12:22 +0000 Subject: [PATCH] test: optimize InputPrompt tests --- packages/cli/src/ui/components/InputPrompt.test.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/ui/components/InputPrompt.test.tsx b/packages/cli/src/ui/components/InputPrompt.test.tsx index fccb4f9230..de47f717ee 100644 --- a/packages/cli/src/ui/components/InputPrompt.test.tsx +++ b/packages/cli/src/ui/components/InputPrompt.test.tsx @@ -4,7 +4,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { renderWithProviders, cleanup } from '../../test-utils/render.js'; +import { + renderWithProviders as originalRenderWithProviders, + cleanup, +} from '../../test-utils/render.js'; import { createMockSettings } from '../../test-utils/settings.js'; import { makeFakeConfig } from '@google/gemini-cli-core'; import { waitFor } from '../../test-utils/async.js'; @@ -71,6 +74,11 @@ import { } from '../../utils/events.js'; import '../../test-utils/customMatchers.js'; +const renderWithProviders = async ( + component: React.ReactElement, + options?: Parameters[1], +) => originalRenderWithProviders(component, { height: 40, ...options }); + vi.mock('../hooks/useShellHistory.js'); vi.mock('../hooks/useCommandCompletion.js'); vi.mock('../hooks/useInputHistory.js');