mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-07-15 20:40:35 -07:00
test(cli): refactor tests for async render utilities (#23252)
This commit is contained in:
committed by
GitHub
parent
86a3a913b5
commit
6c78eb7a39
@@ -43,8 +43,7 @@ describe('QuittingDisplay', () => {
|
||||
mockUseUIState.mockReturnValue({
|
||||
quittingMessages: null,
|
||||
} as unknown as UIState);
|
||||
const { lastFrame, waitUntilReady, unmount } = render(<QuittingDisplay />);
|
||||
await waitUntilReady();
|
||||
const { lastFrame, unmount } = await render(<QuittingDisplay />);
|
||||
expect(lastFrame({ allowEmpty: true })).toBe('');
|
||||
unmount();
|
||||
});
|
||||
@@ -58,8 +57,7 @@ describe('QuittingDisplay', () => {
|
||||
quittingMessages: mockMessages,
|
||||
constrainHeight: false,
|
||||
} as unknown as UIState);
|
||||
const { lastFrame, waitUntilReady, unmount } = render(<QuittingDisplay />);
|
||||
await waitUntilReady();
|
||||
const { lastFrame, unmount } = await render(<QuittingDisplay />);
|
||||
expect(lastFrame()).toContain('Goodbye');
|
||||
expect(lastFrame()).toContain('See you later');
|
||||
unmount();
|
||||
|
||||
Reference in New Issue
Block a user