Fix test flakes by globally mocking ink-spinner (#24044)

This commit is contained in:
Jacob Richman
2026-03-27 14:19:46 -07:00
committed by GitHub
parent f1a3c35dee
commit 97c99f263a
3 changed files with 27 additions and 5 deletions

View File

@@ -8,6 +8,10 @@ import { vi, beforeEach, afterEach } from 'vitest';
import { format } from 'node:util';
import { coreEvents } from '@google/gemini-cli-core';
import { themeManager } from './src/ui/themes/theme-manager.js';
import { mockInkSpinner } from './src/test-utils/mockSpinner.js';
// Globally mock ink-spinner to prevent non-deterministic snapshot/act flakes.
mockInkSpinner();
// Unset CI environment variable so that ink renders dynamically as it does in a real terminal
if (process.env.CI !== undefined) {