mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-17 00:31:44 -07:00
test(cli): refactor tests for async render utilities (#23252)
This commit is contained in:
committed by
GitHub
parent
86a3a913b5
commit
6c78eb7a39
@@ -17,14 +17,14 @@ describe('useModelCommand', () => {
|
||||
return null;
|
||||
}
|
||||
|
||||
it('should initialize with the model dialog closed', () => {
|
||||
const { unmount } = render(<TestComponent />);
|
||||
it('should initialize with the model dialog closed', async () => {
|
||||
const { unmount } = await render(<TestComponent />);
|
||||
expect(result.isModelDialogOpen).toBe(false);
|
||||
unmount();
|
||||
});
|
||||
|
||||
it('should open the model dialog when openModelDialog is called', () => {
|
||||
const { unmount } = render(<TestComponent />);
|
||||
it('should open the model dialog when openModelDialog is called', async () => {
|
||||
const { unmount } = await render(<TestComponent />);
|
||||
|
||||
act(() => {
|
||||
result.openModelDialog();
|
||||
@@ -34,8 +34,8 @@ describe('useModelCommand', () => {
|
||||
unmount();
|
||||
});
|
||||
|
||||
it('should close the model dialog when closeModelDialog is called', () => {
|
||||
const { unmount } = render(<TestComponent />);
|
||||
it('should close the model dialog when closeModelDialog is called', async () => {
|
||||
const { unmount } = await render(<TestComponent />);
|
||||
|
||||
// Open it first
|
||||
act(() => {
|
||||
|
||||
Reference in New Issue
Block a user