test(cli): update test utilities and mock settings for compact output

This commit is contained in:
Jarrod Whelan
2026-02-11 02:26:24 -08:00
parent 3ce035151a
commit 35f56a5496
+6 -9
View File
@@ -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.