mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-30 09:36:37 +00:00
@@ -22,6 +22,7 @@ import type { Settings } from './settings.js';
|
||||
import * as ServerConfig from '@google/gemini-cli-core';
|
||||
import { isWorkspaceTrusted } from './trustedFolders.js';
|
||||
import { ExtensionManager } from './extension-manager.js';
|
||||
import { RESUME_LATEST } from '../utils/sessionUtils.js';
|
||||
|
||||
vi.mock('./trustedFolders.js', () => ({
|
||||
isWorkspaceTrusted: vi
|
||||
@@ -482,6 +483,20 @@ describe('parseArguments', () => {
|
||||
}
|
||||
});
|
||||
|
||||
it('should return RESUME_LATEST constant when --resume is passed without a value', async () => {
|
||||
const originalIsTTY = process.stdin.isTTY;
|
||||
process.stdin.isTTY = true; // Make it interactive to avoid validation error
|
||||
process.argv = ['node', 'script.js', '--resume'];
|
||||
|
||||
try {
|
||||
const argv = await parseArguments({} as Settings);
|
||||
expect(argv.resume).toBe(RESUME_LATEST);
|
||||
expect(argv.resume).toBe('latest');
|
||||
} finally {
|
||||
process.stdin.isTTY = originalIsTTY;
|
||||
}
|
||||
});
|
||||
|
||||
it('should support comma-separated values for --allowed-tools', async () => {
|
||||
process.argv = [
|
||||
'node',
|
||||
|
||||
Reference in New Issue
Block a user