diff options
| author | Brandon Keiji <[email protected]> | 2025-06-18 10:01:00 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-06-18 17:01:00 +0000 |
| commit | 332512853e40e6c9b826b60057a389e9d34453fd (patch) | |
| tree | 7ee45ec5d7f27cb5664c353379580133b223da77 /packages/cli/src/ui/App.test.tsx | |
| parent | 30d1662128e688bf94653a0144ef96c311fae40b (diff) | |
feat: consolidate sandbox configurations into a single object (#1154)
Diffstat (limited to 'packages/cli/src/ui/App.test.tsx')
| -rw-r--r-- | packages/cli/src/ui/App.test.tsx | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/packages/cli/src/ui/App.test.tsx b/packages/cli/src/ui/App.test.tsx index 201d0698..0ebaa34d 100644 --- a/packages/cli/src/ui/App.test.tsx +++ b/packages/cli/src/ui/App.test.tsx @@ -13,6 +13,7 @@ import { ApprovalMode, ToolRegistry, AccessibilitySettings, + SandboxConfig, } from '@gemini-cli/core'; import { LoadedSettings, SettingsFile, Settings } from '../config/settings.js'; import process from 'node:process'; @@ -21,7 +22,7 @@ import process from 'node:process'; interface MockServerConfig { apiKey: string; model: string; - sandbox: boolean | string; + sandbox?: SandboxConfig; targetDir: string; debugMode: boolean; question?: string; @@ -42,7 +43,7 @@ interface MockServerConfig { getApiKey: Mock<() => string>; getModel: Mock<() => string>; - getSandbox: Mock<() => boolean | string>; + getSandbox: Mock<() => SandboxConfig | undefined>; getTargetDir: Mock<() => string>; getToolRegistry: Mock<() => ToolRegistry>; // Use imported ToolRegistry type getDebugMode: Mock<() => boolean>; @@ -78,7 +79,7 @@ vi.mock('@gemini-cli/core', async (importOriginal) => { return { apiKey: opts.apiKey || 'test-key', model: opts.model || 'test-model-in-mock-factory', - sandbox: typeof opts.sandbox === 'boolean' ? opts.sandbox : false, + sandbox: opts.sandbox, targetDir: opts.targetDir || '/test/dir', debugMode: opts.debugMode || false, question: opts.question, @@ -99,9 +100,7 @@ vi.mock('@gemini-cli/core', async (importOriginal) => { getApiKey: vi.fn(() => opts.apiKey || 'test-key'), getModel: vi.fn(() => opts.model || 'test-model-in-mock-factory'), - getSandbox: vi.fn(() => - typeof opts.sandbox === 'boolean' ? opts.sandbox : false, - ), + getSandbox: vi.fn(() => opts.sandbox), getTargetDir: vi.fn(() => opts.targetDir || '/test/dir'), getToolRegistry: vi.fn(() => ({}) as ToolRegistry), // Simple mock getDebugMode: vi.fn(() => opts.debugMode || false), @@ -190,7 +189,7 @@ describe('App UI', () => { model: 'test-model', }, embeddingModel: 'test-embedding-model', - sandbox: false, + sandbox: undefined, targetDir: '/test/dir', debugMode: false, userMemory: '', |
