diff options
Diffstat (limited to 'packages/cli/src/ui/components/FolderTrustDialog.test.tsx')
| -rw-r--r-- | packages/cli/src/ui/components/FolderTrustDialog.test.tsx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/packages/cli/src/ui/components/FolderTrustDialog.test.tsx b/packages/cli/src/ui/components/FolderTrustDialog.test.tsx index d1be0b61..e2b695e2 100644 --- a/packages/cli/src/ui/components/FolderTrustDialog.test.tsx +++ b/packages/cli/src/ui/components/FolderTrustDialog.test.tsx @@ -4,14 +4,16 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { render } from 'ink-testing-library'; +import { renderWithProviders } from '../../test-utils/render.js'; import { waitFor } from '@testing-library/react'; import { vi } from 'vitest'; import { FolderTrustDialog, FolderTrustChoice } from './FolderTrustDialog.js'; describe('FolderTrustDialog', () => { it('should render the dialog with title and description', () => { - const { lastFrame } = render(<FolderTrustDialog onSelect={vi.fn()} />); + const { lastFrame } = renderWithProviders( + <FolderTrustDialog onSelect={vi.fn()} />, + ); expect(lastFrame()).toContain('Do you trust this folder?'); expect(lastFrame()).toContain( @@ -21,7 +23,9 @@ describe('FolderTrustDialog', () => { it('should call onSelect with DO_NOT_TRUST when escape is pressed', async () => { const onSelect = vi.fn(); - const { stdin } = render(<FolderTrustDialog onSelect={onSelect} />); + const { stdin } = renderWithProviders( + <FolderTrustDialog onSelect={onSelect} />, + ); stdin.write('\x1b'); |
