ci: shard windows tests and fix event listener leaks (#18670)

This commit is contained in:
N. Taylor Mullen
2026-02-10 10:46:42 -08:00
committed by GitHub
parent 262138cad5
commit b37e67451a
11 changed files with 77 additions and 25 deletions

View File

@@ -6,9 +6,13 @@
import { vi, beforeEach, afterEach } from 'vitest';
import { format } from 'node:util';
import { coreEvents } from '@google/gemini-cli-core';
global.IS_REACT_ACT_ENVIRONMENT = true;
// Increase max listeners to avoid warnings in large test suites
coreEvents.setMaxListeners(100);
// Unset NO_COLOR environment variable to ensure consistent theme behavior between local and CI test runs
if (process.env.NO_COLOR !== undefined) {
delete process.env.NO_COLOR;
@@ -55,6 +59,8 @@ beforeEach(() => {
afterEach(() => {
consoleErrorSpy.mockRestore();
vi.unstubAllEnvs();
if (actWarnings.length > 0) {
const messages = actWarnings
.map(({ message, stack }) => `${message}\n${stack}`)