mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-06-13 21:07:00 -07:00
test: optimize InputPrompt tests
This commit is contained in:
@@ -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<typeof originalRenderWithProviders>[1],
|
||||
) => originalRenderWithProviders(component, { height: 40, ...options });
|
||||
|
||||
vi.mock('../hooks/useShellHistory.js');
|
||||
vi.mock('../hooks/useCommandCompletion.js');
|
||||
vi.mock('../hooks/useInputHistory.js');
|
||||
|
||||
Reference in New Issue
Block a user