diff --git a/packages/cli/src/ui/hooks/useSelectionList.test.tsx b/packages/cli/src/ui/hooks/useSelectionList.test.tsx index fc28f061be..ca110ce06d 100644 --- a/packages/cli/src/ui/hooks/useSelectionList.test.tsx +++ b/packages/cli/src/ui/hooks/useSelectionList.test.tsx @@ -7,7 +7,7 @@ import { vi, describe, it, expect, beforeEach, afterEach } from 'vitest'; import { act } from 'react'; -import { renderWithProviders } from '../../test-utils/render.js'; +import { renderWithProviders as originalRenderWithProviders } from '../../test-utils/render.js'; import { waitFor } from '../../test-utils/async.js'; import { useSelectionList, @@ -17,6 +17,11 @@ import * as useKeypressModule from './useKeypress.js'; import type { KeypressHandler, Key } from '../contexts/KeypressContext.js'; +const renderWithProviders = async ( + component: React.ReactElement, + options?: Parameters[1], +) => originalRenderWithProviders(component, { height: 40, ...options }); + type UseKeypressMockOptions = { isActive: boolean }; let activeKeypressHandler: KeypressHandler | null = null;