mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-06-18 23:36:43 -07:00
chore: fix failing tests after merge
This commit is contained in:
@@ -880,7 +880,9 @@ export class Task {
|
||||
if (
|
||||
part.kind !== 'data' ||
|
||||
!part.data ||
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
typeof part.data['callId'] !== 'string' ||
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
typeof part.data['outcome'] !== 'string'
|
||||
) {
|
||||
return false;
|
||||
|
||||
@@ -33,7 +33,7 @@ describe('<MaxSizedBox />', () => {
|
||||
</OverflowProvider>,
|
||||
);
|
||||
await act(async () => {
|
||||
vi.runAllTimers();
|
||||
vi.advanceTimersByTime(500);
|
||||
});
|
||||
await waitUntilReady();
|
||||
expect(lastFrame()).toContain('Hello, World!');
|
||||
@@ -54,7 +54,7 @@ describe('<MaxSizedBox />', () => {
|
||||
</OverflowProvider>,
|
||||
);
|
||||
await act(async () => {
|
||||
vi.runAllTimers();
|
||||
vi.advanceTimersByTime(500);
|
||||
});
|
||||
await waitUntilReady();
|
||||
expect(lastFrame()).toContain(
|
||||
@@ -77,7 +77,7 @@ describe('<MaxSizedBox />', () => {
|
||||
</OverflowProvider>,
|
||||
);
|
||||
await act(async () => {
|
||||
vi.runAllTimers();
|
||||
vi.advanceTimersByTime(500);
|
||||
});
|
||||
await waitUntilReady();
|
||||
expect(lastFrame()).toContain(
|
||||
@@ -100,7 +100,7 @@ describe('<MaxSizedBox />', () => {
|
||||
</OverflowProvider>,
|
||||
);
|
||||
await act(async () => {
|
||||
vi.runAllTimers();
|
||||
vi.advanceTimersByTime(500);
|
||||
});
|
||||
await waitUntilReady();
|
||||
expect(lastFrame()).toContain(
|
||||
@@ -121,7 +121,7 @@ describe('<MaxSizedBox />', () => {
|
||||
</OverflowProvider>,
|
||||
);
|
||||
await act(async () => {
|
||||
vi.runAllTimers();
|
||||
vi.advanceTimersByTime(500);
|
||||
});
|
||||
await waitUntilReady();
|
||||
expect(lastFrame()).toContain(
|
||||
@@ -144,7 +144,7 @@ describe('<MaxSizedBox />', () => {
|
||||
</OverflowProvider>,
|
||||
);
|
||||
await act(async () => {
|
||||
vi.runAllTimers();
|
||||
vi.advanceTimersByTime(500);
|
||||
});
|
||||
await waitUntilReady();
|
||||
expect(lastFrame()).toContain(
|
||||
@@ -166,7 +166,7 @@ describe('<MaxSizedBox />', () => {
|
||||
);
|
||||
|
||||
await act(async () => {
|
||||
vi.runAllTimers();
|
||||
vi.advanceTimersByTime(500);
|
||||
});
|
||||
await waitUntilReady();
|
||||
expect(lastFrame()).toContain('This is a');
|
||||
@@ -186,7 +186,7 @@ describe('<MaxSizedBox />', () => {
|
||||
</OverflowProvider>,
|
||||
);
|
||||
await act(async () => {
|
||||
vi.runAllTimers();
|
||||
vi.advanceTimersByTime(500);
|
||||
});
|
||||
await waitUntilReady();
|
||||
expect(lastFrame()).toContain('Line 1');
|
||||
@@ -201,7 +201,7 @@ describe('<MaxSizedBox />', () => {
|
||||
</OverflowProvider>,
|
||||
);
|
||||
await act(async () => {
|
||||
vi.runAllTimers();
|
||||
vi.advanceTimersByTime(500);
|
||||
});
|
||||
await waitUntilReady();
|
||||
expect(lastFrame({ allowEmpty: true })?.trim()).equals('');
|
||||
@@ -223,7 +223,7 @@ describe('<MaxSizedBox />', () => {
|
||||
</OverflowProvider>,
|
||||
);
|
||||
await act(async () => {
|
||||
vi.runAllTimers();
|
||||
vi.advanceTimersByTime(500);
|
||||
});
|
||||
await waitUntilReady();
|
||||
expect(lastFrame()).toContain('Line 1 from Fragment');
|
||||
@@ -247,7 +247,7 @@ describe('<MaxSizedBox />', () => {
|
||||
);
|
||||
|
||||
await act(async () => {
|
||||
vi.runAllTimers();
|
||||
vi.advanceTimersByTime(500);
|
||||
});
|
||||
await waitUntilReady();
|
||||
expect(lastFrame()).toContain(
|
||||
@@ -273,7 +273,7 @@ describe('<MaxSizedBox />', () => {
|
||||
);
|
||||
|
||||
await act(async () => {
|
||||
vi.runAllTimers();
|
||||
vi.advanceTimersByTime(500);
|
||||
});
|
||||
await waitUntilReady();
|
||||
expect(lastFrame()).toContain(
|
||||
@@ -300,7 +300,7 @@ describe('<MaxSizedBox />', () => {
|
||||
);
|
||||
|
||||
await act(async () => {
|
||||
vi.runAllTimers();
|
||||
vi.advanceTimersByTime(500);
|
||||
});
|
||||
await waitUntilReady();
|
||||
expect(lastFrame()).toContain('... last');
|
||||
|
||||
@@ -9,7 +9,17 @@ import { act } from 'react';
|
||||
import { renderHookWithProviders } from '../../test-utils/render.js';
|
||||
import { createMockSettings } from '../../test-utils/settings.js';
|
||||
import { waitFor } from '../../test-utils/async.js';
|
||||
import { vi, afterAll, beforeAll, type Mock } from 'vitest';
|
||||
import {
|
||||
describe,
|
||||
it,
|
||||
expect,
|
||||
vi,
|
||||
beforeEach,
|
||||
afterEach,
|
||||
afterAll,
|
||||
beforeAll,
|
||||
type Mock,
|
||||
} from 'vitest';
|
||||
import {
|
||||
useKeypressContext,
|
||||
ESC_TIMEOUT,
|
||||
@@ -1078,7 +1088,7 @@ describe('KeypressContext', () => {
|
||||
|
||||
// Advance timers to trigger the backslash timeout
|
||||
act(() => {
|
||||
vi.runAllTimers();
|
||||
vi.advanceTimersByTime(100);
|
||||
});
|
||||
|
||||
expect(keyHandler).toHaveBeenCalledWith(
|
||||
|
||||
Reference in New Issue
Block a user