test(cli): fix act() warnings and add global cleanup

This commit is contained in:
Keith Guerin
2026-03-24 15:49:15 -07:00
parent a293fdcede
commit 73c244861c
+2
View File
@@ -8,6 +8,7 @@ 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 { cleanup } from './src/test-utils/render.js';
// Unset CI environment variable so that ink renders dynamically as it does in a real terminal
if (process.env.CI !== undefined) {
@@ -79,6 +80,7 @@ beforeEach(() => {
});
afterEach(() => {
cleanup();
consoleErrorSpy.mockRestore();
vi.unstubAllEnvs();