From 050f0f50c94435b5bc117976d256a39093dc32dc Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Fri, 1 May 2026 12:31:43 +0100 Subject: [PATCH] refactor: trim cli test helper exports --- src/agents/live-test-helpers.ts | 2 +- src/cli/plugins-cli-test-helpers.ts | 18 +++++++++--------- src/cli/requirements-test-fixtures.ts | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/agents/live-test-helpers.ts b/src/agents/live-test-helpers.ts index a8dc8bfad29..4050ca5fbeb 100644 --- a/src/agents/live-test-helpers.ts +++ b/src/agents/live-test-helpers.ts @@ -1,6 +1,6 @@ import { isTruthyEnvValue } from "../infra/env.js"; -export const LIVE_OK_PROMPT = "Reply with the word ok."; +const LIVE_OK_PROMPT = "Reply with the word ok."; export function isLiveTestEnabled( extraEnvVars: readonly string[] = [], diff --git a/src/cli/plugins-cli-test-helpers.ts b/src/cli/plugins-cli-test-helpers.ts index 4649a219dbb..8dfce4de2c7 100644 --- a/src/cli/plugins-cli-test-helpers.ts +++ b/src/cli/plugins-cli-test-helpers.ts @@ -39,15 +39,15 @@ export const writeConfigFile: AsyncUnknownMock = vi.fn(async () => undefined); export const replaceConfigFile: AsyncUnknownMock = vi.fn( async (params: { nextConfig: OpenClawConfig }) => await writeConfigFile(params.nextConfig), ) as AsyncUnknownMock; -export const resolveStateDir: Mock<() => string> = vi.fn(() => "/tmp/openclaw-state"); +const resolveStateDir: Mock<() => string> = vi.fn(() => "/tmp/openclaw-state"); export const installPluginFromMarketplace: Mock = vi.fn(); export const installPluginFromGitSpec: Mock = vi.fn(); -export const parseGitPluginSpec: Mock = vi.fn(); -export const listMarketplacePlugins: Mock = vi.fn(); -export const resolveMarketplaceInstallShortcut: Mock = vi.fn(); +const parseGitPluginSpec: Mock = vi.fn(); +const listMarketplacePlugins: Mock = vi.fn(); +const resolveMarketplaceInstallShortcut: Mock = vi.fn(); export const enablePluginInConfig: UnknownMock = vi.fn(); export const recordPluginInstall: UnknownMock = vi.fn(); -export const loadInstalledPluginIndexInstallRecords: AsyncUnknownMock = vi.fn(async () => +const loadInstalledPluginIndexInstallRecords: AsyncUnknownMock = vi.fn(async () => clonePluginInstallRecords(mockInstalledPluginIndexInstallRecords), ); export const writePersistedInstalledPluginIndexInstallRecords: AsyncUnknownMock = vi.fn( @@ -57,19 +57,19 @@ export const writePersistedInstalledPluginIndexInstallRecords: AsyncUnknownMock ); }, ); -export const loadPluginManifestRegistry: UnknownMock = vi.fn(); +const loadPluginManifestRegistry: UnknownMock = vi.fn(); export const buildPluginSnapshotReport: UnknownMock = vi.fn(); export const buildPluginRegistrySnapshotReport: UnknownMock = vi.fn(); export const buildPluginInspectReport: UnknownMock = vi.fn(); -export const buildAllPluginInspectReports: UnknownMock = vi.fn(); +const buildAllPluginInspectReports: UnknownMock = vi.fn(); export const buildPluginDiagnosticsReport: UnknownMock = vi.fn(); -export const buildPluginCompatibilityNotices: UnknownMock = vi.fn(); +const buildPluginCompatibilityNotices: UnknownMock = vi.fn(); export const inspectPluginRegistry: AsyncUnknownMock = vi.fn(); export const refreshPluginRegistry: AsyncUnknownMock = vi.fn(); export const applyExclusiveSlotSelection: UnknownMock = vi.fn(); export const planPluginUninstall: UnknownMock = vi.fn(); export const applyPluginUninstallDirectoryRemoval: AsyncUnknownMock = vi.fn(); -export const uninstallPlugin: AsyncUnknownMock = vi.fn(); +const uninstallPlugin: AsyncUnknownMock = vi.fn(); export const updateNpmInstalledPlugins: AsyncUnknownMock = vi.fn(); export const updateNpmInstalledHookPacks: AsyncUnknownMock = vi.fn(); export const promptYesNo: AsyncUnknownMock = vi.fn(); diff --git a/src/cli/requirements-test-fixtures.ts b/src/cli/requirements-test-fixtures.ts index a8cda44fd7b..4ef7e8fb8c6 100644 --- a/src/cli/requirements-test-fixtures.ts +++ b/src/cli/requirements-test-fixtures.ts @@ -1,4 +1,4 @@ -export function createEmptyRequirements() { +function createEmptyRequirements() { return { bins: [], anyBins: [],