mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-11 22:00:41 -07:00
test(cli): refactor tests for async render utilities (#23252)
This commit is contained in:
committed by
GitHub
parent
86a3a913b5
commit
6c78eb7a39
@@ -106,8 +106,7 @@ describe('<DefaultAppLayout />', () => {
|
||||
mockUIState.activeBackgroundShellPid = 123;
|
||||
mockUIState.backgroundShellHeight = 5;
|
||||
|
||||
const { lastFrame, waitUntilReady, unmount } = render(<DefaultAppLayout />);
|
||||
await waitUntilReady();
|
||||
const { lastFrame, unmount } = await render(<DefaultAppLayout />);
|
||||
expect(lastFrame()).toMatchSnapshot();
|
||||
unmount();
|
||||
});
|
||||
@@ -118,8 +117,7 @@ describe('<DefaultAppLayout />', () => {
|
||||
mockUIState.backgroundShellHeight = 5;
|
||||
mockUIState.streamingState = StreamingState.WaitingForConfirmation;
|
||||
|
||||
const { lastFrame, waitUntilReady, unmount } = render(<DefaultAppLayout />);
|
||||
await waitUntilReady();
|
||||
const { lastFrame, unmount } = await render(<DefaultAppLayout />);
|
||||
expect(lastFrame()).toMatchSnapshot();
|
||||
unmount();
|
||||
});
|
||||
@@ -130,8 +128,7 @@ describe('<DefaultAppLayout />', () => {
|
||||
mockUIState.backgroundShellHeight = 5;
|
||||
mockUIState.streamingState = StreamingState.Responding;
|
||||
|
||||
const { lastFrame, waitUntilReady, unmount } = render(<DefaultAppLayout />);
|
||||
await waitUntilReady();
|
||||
const { lastFrame, unmount } = await render(<DefaultAppLayout />);
|
||||
expect(lastFrame()).toMatchSnapshot();
|
||||
unmount();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user