mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-13 15:40:57 -07:00
Disallow unnecessary awaits. (#15172)
This commit is contained in:
committed by
GitHub
parent
3e9a0a7628
commit
7f2d33458a
@@ -89,7 +89,7 @@ describe('MultiFolderTrustDialog', () => {
|
||||
|
||||
const keypressCallback = mockedUseKeypress.mock.calls[0][0];
|
||||
await act(async () => {
|
||||
await keypressCallback({
|
||||
keypressCallback({
|
||||
name: 'escape',
|
||||
ctrl: false,
|
||||
meta: false,
|
||||
@@ -117,7 +117,7 @@ describe('MultiFolderTrustDialog', () => {
|
||||
|
||||
const { onSelect } = mockedRadioButtonSelect.mock.calls[0][0];
|
||||
await act(async () => {
|
||||
await onSelect(MultiFolderTrustChoice.NO);
|
||||
onSelect(MultiFolderTrustChoice.NO);
|
||||
});
|
||||
|
||||
expect(mockFinishAddingDirectories).toHaveBeenCalledWith(
|
||||
@@ -145,7 +145,7 @@ describe('MultiFolderTrustDialog', () => {
|
||||
|
||||
const { onSelect } = mockedRadioButtonSelect.mock.calls[0][0];
|
||||
await act(async () => {
|
||||
await onSelect(MultiFolderTrustChoice.YES);
|
||||
onSelect(MultiFolderTrustChoice.YES);
|
||||
});
|
||||
|
||||
expect(mockAddDirectory).toHaveBeenCalledWith('/path/to/folder1');
|
||||
@@ -166,7 +166,7 @@ describe('MultiFolderTrustDialog', () => {
|
||||
|
||||
const { onSelect } = mockedRadioButtonSelect.mock.calls[0][0];
|
||||
await act(async () => {
|
||||
await onSelect(MultiFolderTrustChoice.YES_AND_REMEMBER);
|
||||
onSelect(MultiFolderTrustChoice.YES_AND_REMEMBER);
|
||||
});
|
||||
|
||||
expect(mockAddDirectory).toHaveBeenCalledWith('/path/to/folder1');
|
||||
@@ -192,7 +192,7 @@ describe('MultiFolderTrustDialog', () => {
|
||||
const { onSelect } = mockedRadioButtonSelect.mock.calls[0][0];
|
||||
|
||||
await act(async () => {
|
||||
await onSelect(MultiFolderTrustChoice.NO);
|
||||
onSelect(MultiFolderTrustChoice.NO);
|
||||
});
|
||||
|
||||
expect(lastFrame()).toContain('Applying trust settings...');
|
||||
@@ -210,7 +210,7 @@ describe('MultiFolderTrustDialog', () => {
|
||||
|
||||
const { onSelect } = mockedRadioButtonSelect.mock.calls[0][0];
|
||||
await act(async () => {
|
||||
await onSelect(MultiFolderTrustChoice.YES);
|
||||
onSelect(MultiFolderTrustChoice.YES);
|
||||
});
|
||||
|
||||
expect(mockAddItem).toHaveBeenCalledWith(
|
||||
@@ -243,7 +243,7 @@ describe('MultiFolderTrustDialog', () => {
|
||||
|
||||
const { onSelect } = mockedRadioButtonSelect.mock.calls[0][0];
|
||||
await act(async () => {
|
||||
await onSelect(MultiFolderTrustChoice.YES);
|
||||
onSelect(MultiFolderTrustChoice.YES);
|
||||
});
|
||||
|
||||
expect(mockAddDirectory).toHaveBeenCalledWith('/path/to/good');
|
||||
|
||||
Reference in New Issue
Block a user