mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-07-08 09:06:48 -07:00
test(cli): refactor tests for async render utilities (#23252)
This commit is contained in:
committed by
GitHub
parent
86a3a913b5
commit
6c78eb7a39
@@ -17,15 +17,14 @@ describe('AdminSettingsChangedDialog', () => {
|
||||
});
|
||||
|
||||
it('renders correctly', async () => {
|
||||
const { lastFrame, waitUntilReady } = await renderWithProviders(
|
||||
const { lastFrame } = await renderWithProviders(
|
||||
<AdminSettingsChangedDialog />,
|
||||
);
|
||||
await waitUntilReady();
|
||||
expect(lastFrame()).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('restarts on "r" key press', async () => {
|
||||
const { stdin, waitUntilReady } = await renderWithProviders(
|
||||
const { stdin } = await renderWithProviders(
|
||||
<AdminSettingsChangedDialog />,
|
||||
{
|
||||
uiActions: {
|
||||
@@ -33,7 +32,6 @@ describe('AdminSettingsChangedDialog', () => {
|
||||
},
|
||||
},
|
||||
);
|
||||
await waitUntilReady();
|
||||
|
||||
act(() => {
|
||||
stdin.write('r');
|
||||
@@ -43,7 +41,7 @@ describe('AdminSettingsChangedDialog', () => {
|
||||
});
|
||||
|
||||
it.each(['r', 'R'])('restarts on "%s" key press', async (key) => {
|
||||
const { stdin, waitUntilReady } = await renderWithProviders(
|
||||
const { stdin } = await renderWithProviders(
|
||||
<AdminSettingsChangedDialog />,
|
||||
{
|
||||
uiActions: {
|
||||
@@ -51,7 +49,6 @@ describe('AdminSettingsChangedDialog', () => {
|
||||
},
|
||||
},
|
||||
);
|
||||
await waitUntilReady();
|
||||
|
||||
act(() => {
|
||||
stdin.write(key);
|
||||
|
||||
Reference in New Issue
Block a user