mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-15 14:23:02 -07:00
fix(test): move flaky MainContent tests to non-blocking suite
This commit is contained in:
@@ -12,6 +12,8 @@ import { vi } from 'vitest';
|
||||
// or @testing-library/react-native
|
||||
// The version of waitFor from vitest is still fine to use if you aren't waiting
|
||||
// for React state updates.
|
||||
export const skipFlaky = !process.env['RUN_FLAKY_INTEGRATION'];
|
||||
|
||||
export async function waitFor(
|
||||
assertion: () => void | Promise<void>,
|
||||
{ timeout = 2000, interval = 50 } = {},
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
import { renderWithProviders } from '../../test-utils/render.js';
|
||||
import { createMockSettings } from '../../test-utils/settings.js';
|
||||
import { makeFakeConfig, CoreToolCallStatus } from '@google/gemini-cli-core';
|
||||
import { waitFor } from '../../test-utils/async.js';
|
||||
import { waitFor, skipFlaky } from '../../test-utils/async.js';
|
||||
import { MainContent } from './MainContent.js';
|
||||
import { getToolGroupBorderAppearance } from '../utils/borderStyles.js';
|
||||
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
|
||||
@@ -318,7 +318,7 @@ describe('getToolGroupBorderAppearance', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('MainContent', () => {
|
||||
describe.skipIf(skipFlaky)('MainContent', () => {
|
||||
const defaultMockUiState = {
|
||||
history: [
|
||||
{ id: 1, type: 'user', text: 'Hello' },
|
||||
|
||||
Reference in New Issue
Block a user