mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-13 05:12:55 -07:00
fix: make test more reliable (#7233)
This commit is contained in:
@@ -1442,10 +1442,17 @@ describe('InputPrompt', () => {
|
|||||||
const { stdin, stdout, unmount } = renderWithProviders(
|
const { stdin, stdout, unmount } = renderWithProviders(
|
||||||
<InputPrompt {...props} />,
|
<InputPrompt {...props} />,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
act(() => {
|
||||||
stdin.write('\x12');
|
stdin.write('\x12');
|
||||||
|
});
|
||||||
await wait();
|
await wait();
|
||||||
|
|
||||||
expect(stdout.lastFrame()).toContain('(r:)');
|
expect(stdout.lastFrame()).toContain('(r:)');
|
||||||
|
|
||||||
|
act(() => {
|
||||||
stdin.write('\r');
|
stdin.write('\r');
|
||||||
|
});
|
||||||
|
|
||||||
await waitFor(() => {
|
await waitFor(() => {
|
||||||
expect(stdout.lastFrame()).not.toContain('(r:)');
|
expect(stdout.lastFrame()).not.toContain('(r:)');
|
||||||
|
|||||||
Reference in New Issue
Block a user