fix(test): move flaky MainContent tests to non-blocking suite

This commit is contained in:
mkorwel
2026-03-27 17:28:49 -07:00
parent bf6dae4690
commit ffc86f1dd9
2 changed files with 4 additions and 2 deletions
+2
View File
@@ -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' },