mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-24 20:14:44 -07:00
Disallow floating promises. (#14605)
This commit is contained in:
committed by
GitHub
parent
3cf44acc08
commit
025e450ac2
@@ -584,11 +584,13 @@ describe('useSelectionList', () => {
|
||||
});
|
||||
|
||||
pressNumber('0');
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
act(() => vi.advanceTimersByTime(1000)); // Timeout the '0' input
|
||||
|
||||
pressNumber('1');
|
||||
expect(mockOnSelect).not.toHaveBeenCalled(); // Should be waiting for second digit
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
act(() => vi.advanceTimersByTime(1000)); // Timeout '1'
|
||||
expect(mockOnSelect).toHaveBeenCalledWith('Item 1');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user