mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-07 20:00:37 -07:00
Enhance TestRig with process management and timeouts (#15908)
This commit is contained in:
@@ -25,6 +25,16 @@ export function registerSyncCleanup(fn: () => void) {
|
||||
syncCleanupFunctions.push(fn);
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets the internal cleanup state for testing purposes.
|
||||
* This allows tests to run in isolation without vi.resetModules().
|
||||
*/
|
||||
export function resetCleanupForTesting() {
|
||||
cleanupFunctions.length = 0;
|
||||
syncCleanupFunctions.length = 0;
|
||||
configForTelemetry = null;
|
||||
}
|
||||
|
||||
export function runSyncCleanup() {
|
||||
for (const fn of syncCleanupFunctions) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user