refactor: trim command test helper exports

This commit is contained in:
Peter Steinberger
2026-05-01 12:42:16 +01:00
parent 7b3dfbf214
commit 29d9a30497
3 changed files with 8 additions and 8 deletions

View File

@@ -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) {

View File

@@ -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,

View File

@@ -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[];