mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-19 02:20:42 -07:00
Protect stdout and stderr so JavaScript code can't accidentally write to stdout corrupting ink rendering (#13247)
Bypassing rules as link checker failure is spurious.
This commit is contained in:
@@ -8,6 +8,7 @@ import { vi, describe, it, expect, beforeEach, afterEach } from 'vitest';
|
||||
import { execSync } from 'node:child_process';
|
||||
import * as os from 'node:os';
|
||||
import { detect as chardetDetect } from 'chardet';
|
||||
import { debugLogger } from './debugLogger.js';
|
||||
|
||||
// Mock dependencies
|
||||
vi.mock('child_process');
|
||||
@@ -30,7 +31,7 @@ describe('Shell Command Processor - Encoding Functions', () => {
|
||||
let mockedChardetDetect: ReturnType<typeof vi.mocked<typeof chardetDetect>>;
|
||||
|
||||
beforeEach(() => {
|
||||
consoleWarnSpy = vi.spyOn(console, 'warn').mockImplementation(() => {});
|
||||
consoleWarnSpy = vi.spyOn(debugLogger, 'warn').mockImplementation(() => {});
|
||||
mockedExecSync = vi.mocked(execSync);
|
||||
mockedOsPlatform = vi.mocked(os.platform);
|
||||
mockedChardetDetect = vi.mocked(chardetDetect);
|
||||
|
||||
Reference in New Issue
Block a user