mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-14 13:53:02 -07:00
feat(cli): implement atomic writes and safety checks for trusted folders (#18406)
This commit is contained in:
@@ -46,22 +46,26 @@ describe('LogoutConfirmationDialog', () => {
|
||||
expect(mockCall.isFocused).toBe(true);
|
||||
});
|
||||
|
||||
it('should call onSelect with LOGIN when Login is selected', () => {
|
||||
it('should call onSelect with LOGIN when Login is selected', async () => {
|
||||
const onSelect = vi.fn();
|
||||
renderWithProviders(<LogoutConfirmationDialog onSelect={onSelect} />);
|
||||
|
||||
const mockCall = vi.mocked(RadioButtonSelect).mock.calls[0][0];
|
||||
mockCall.onSelect(LogoutChoice.LOGIN);
|
||||
await act(async () => {
|
||||
mockCall.onSelect(LogoutChoice.LOGIN);
|
||||
});
|
||||
|
||||
expect(onSelect).toHaveBeenCalledWith(LogoutChoice.LOGIN);
|
||||
});
|
||||
|
||||
it('should call onSelect with EXIT when Exit is selected', () => {
|
||||
it('should call onSelect with EXIT when Exit is selected', async () => {
|
||||
const onSelect = vi.fn();
|
||||
renderWithProviders(<LogoutConfirmationDialog onSelect={onSelect} />);
|
||||
|
||||
const mockCall = vi.mocked(RadioButtonSelect).mock.calls[0][0];
|
||||
mockCall.onSelect(LogoutChoice.EXIT);
|
||||
await act(async () => {
|
||||
mockCall.onSelect(LogoutChoice.EXIT);
|
||||
});
|
||||
|
||||
expect(onSelect).toHaveBeenCalledWith(LogoutChoice.EXIT);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user