fix: make test more reliable (#7233)

This commit is contained in:
Gaurav
2025-08-27 10:13:38 -07:00
committed by GitHub
parent 99a28e6b6a
commit 0c1f3acc7d

View File

@@ -1442,10 +1442,17 @@ describe('InputPrompt', () => {
const { stdin, stdout, unmount } = renderWithProviders(
<InputPrompt {...props} />,
);
act(() => {
stdin.write('\x12');
});
await wait();
expect(stdout.lastFrame()).toContain('(r:)');
act(() => {
stdin.write('\r');
});
await waitFor(() => {
expect(stdout.lastFrame()).not.toContain('(r:)');