diff options
| author | Jacob Richman <[email protected]> | 2025-08-14 16:39:12 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-08-14 23:39:12 +0000 |
| commit | a5c81e3fe07d264dd467d9d2aebb8ae0bc32bfb3 (patch) | |
| tree | a8b4a031d7b2ee22dc11786bcfa0996f3b913d48 /packages/cli/src/ui/components/InputPrompt.test.tsx | |
| parent | 8c0c8d77706ba3ebea36d42c38f903aa6dd1bf7b (diff) | |
Fix flake due to using wait instead of waitFor (#6277)
Diffstat (limited to 'packages/cli/src/ui/components/InputPrompt.test.tsx')
| -rw-r--r-- | packages/cli/src/ui/components/InputPrompt.test.tsx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/packages/cli/src/ui/components/InputPrompt.test.tsx b/packages/cli/src/ui/components/InputPrompt.test.tsx index a29a095a..ec2d7441 100644 --- a/packages/cli/src/ui/components/InputPrompt.test.tsx +++ b/packages/cli/src/ui/components/InputPrompt.test.tsx @@ -1217,17 +1217,18 @@ describe('InputPrompt', () => { props.buffer.setText('some text'); const { stdin, unmount } = render(<InputPrompt {...props} />); - await wait(); stdin.write('\x1B'); - await wait(); - expect(onEscapePromptChange).toHaveBeenCalledWith(true); + await waitFor(() => { + expect(onEscapePromptChange).toHaveBeenCalledWith(true); + }); stdin.write('a'); - await wait(); - expect(onEscapePromptChange).toHaveBeenCalledWith(false); + await waitFor(() => { + expect(onEscapePromptChange).toHaveBeenCalledWith(false); + }); unmount(); }); |
