mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-25 04:24:51 -07:00
ci: shard windows tests and fix event listener leaks (#18670)
This commit is contained in:
@@ -10,11 +10,19 @@ if (process.env.NO_COLOR !== undefined) {
|
||||
}
|
||||
|
||||
import { setSimulate429 } from './src/utils/testUtils.js';
|
||||
import { vi } from 'vitest';
|
||||
import { vi, afterEach } from 'vitest';
|
||||
import { coreEvents } from './src/utils/events.js';
|
||||
|
||||
// Increase max listeners to avoid warnings in large test suites
|
||||
coreEvents.setMaxListeners(100);
|
||||
|
||||
// Disable 429 simulation globally for all tests
|
||||
setSimulate429(false);
|
||||
|
||||
afterEach(() => {
|
||||
vi.unstubAllEnvs();
|
||||
});
|
||||
|
||||
// Default mocks for Storage and ProjectRegistry to prevent disk access in most tests.
|
||||
// These can be overridden in specific tests using vi.unmock().
|
||||
|
||||
|
||||
Reference in New Issue
Block a user