mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-12 21:03:05 -07:00
test(cli): update test utilities and mock settings for compact output
This commit is contained in:
@@ -10,7 +10,7 @@ import type React from 'react';
|
|||||||
import { vi } from 'vitest';
|
import { vi } from 'vitest';
|
||||||
import { act, useState } from 'react';
|
import { act, useState } from 'react';
|
||||||
import os from 'node:os';
|
import os from 'node:os';
|
||||||
import { LoadedSettings } from '../config/settings.js';
|
import type { LoadedSettings } from '../config/settings.js';
|
||||||
import { KeypressProvider } from '../ui/contexts/KeypressContext.js';
|
import { KeypressProvider } from '../ui/contexts/KeypressContext.js';
|
||||||
import { SettingsContext } from '../ui/contexts/SettingsContext.js';
|
import { SettingsContext } from '../ui/contexts/SettingsContext.js';
|
||||||
import { ShellFocusContext } from '../ui/contexts/ShellFocusContext.js';
|
import { ShellFocusContext } from '../ui/contexts/ShellFocusContext.js';
|
||||||
@@ -130,14 +130,11 @@ const configProxy = new Proxy({} as Config, {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const mockSettings = new LoadedSettings(
|
export const mockSettings = createMockSettings({
|
||||||
{ path: '', settings: {}, originalSettings: {} },
|
ui: {
|
||||||
{ path: '', settings: {}, originalSettings: {} },
|
enableCompactToolOutput: false,
|
||||||
{ path: '', settings: {}, originalSettings: {} },
|
},
|
||||||
{ path: '', settings: {}, originalSettings: {} },
|
});
|
||||||
true,
|
|
||||||
[],
|
|
||||||
);
|
|
||||||
|
|
||||||
// A minimal mock UIState to satisfy the context provider.
|
// A minimal mock UIState to satisfy the context provider.
|
||||||
// Tests that need specific UIState values should provide their own.
|
// Tests that need specific UIState values should provide their own.
|
||||||
|
|||||||
Reference in New Issue
Block a user