mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 15:30:47 +00:00
refactor: trim command test helper exports
This commit is contained in:
@@ -23,7 +23,7 @@ function createChannelTestRuntime(): PluginRuntime {
|
||||
} as PluginRuntime;
|
||||
}
|
||||
|
||||
export function setChannelPluginRegistryForTests(onlyPluginIds?: readonly string[]): void {
|
||||
function setChannelPluginRegistryForTests(onlyPluginIds?: readonly string[]): void {
|
||||
const plugins = resolveChannelPluginsForTests(onlyPluginIds);
|
||||
const runtime = createChannelTestRuntime();
|
||||
for (const plugin of plugins) {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { vi } from "vitest";
|
||||
import { createNonExitingRuntime, type RuntimeEnv } from "../runtime.js";
|
||||
|
||||
export const resolveCleanupPlanFromDisk = vi.fn();
|
||||
export const removePath = vi.fn();
|
||||
export const listAgentSessionDirs = vi.fn();
|
||||
export const removeStateAndLinkedPaths = vi.fn();
|
||||
export const removeWorkspaceDirs = vi.fn();
|
||||
const resolveCleanupPlanFromDisk = vi.fn();
|
||||
const removePath = vi.fn();
|
||||
const listAgentSessionDirs = vi.fn();
|
||||
const removeStateAndLinkedPaths = vi.fn();
|
||||
const removeWorkspaceDirs = vi.fn();
|
||||
|
||||
vi.mock("../config/config.js", () => ({
|
||||
isNixMode: false,
|
||||
|
||||
@@ -13,13 +13,13 @@ export const baseConfigSnapshot = {
|
||||
legacyIssues: [],
|
||||
};
|
||||
|
||||
export type TestRuntime = {
|
||||
type TestRuntime = {
|
||||
log: MockFn<RuntimeEnv["log"]>;
|
||||
error: MockFn<RuntimeEnv["error"]>;
|
||||
exit: MockFn<RuntimeEnv["exit"]>;
|
||||
};
|
||||
|
||||
export type CapturingTestRuntime = {
|
||||
type CapturingTestRuntime = {
|
||||
runtime: RuntimeEnv;
|
||||
logs: string[];
|
||||
errors: string[];
|
||||
|
||||
Reference in New Issue
Block a user