refactor(cli): code review cleanup fix for tab+tab (#18967)

This commit is contained in:
Jacob Richman
2026-02-17 07:16:37 -08:00
committed by GitHub
parent e5ff2023ad
commit 366f1df120
14 changed files with 334 additions and 197 deletions
+5 -3
View File
@@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
import { act } from 'react';
import { renderWithProviders } from '../../test-utils/render.js';
import {
describe,
@@ -318,9 +319,10 @@ describe('AuthDialog', () => {
renderWithProviders(<AuthDialog {...props} />);
const { onSelect: handleAuthSelect } =
mockedRadioButtonSelect.mock.calls[0][0];
await handleAuthSelect(AuthType.LOGIN_WITH_GOOGLE);
await vi.runAllTimersAsync();
await act(async () => {
await handleAuthSelect(AuthType.LOGIN_WITH_GOOGLE);
await vi.runAllTimersAsync();
});
expect(mockedRunExitCleanup).toHaveBeenCalled();
expect(exitSpy).toHaveBeenCalledWith(RELAUNCH_EXIT_CODE);