Files
openclaw/src/commands/test-runtime-config-helpers.ts
2026-02-16 15:19:11 +00:00

28 lines
475 B
TypeScript

import { vi } from "vitest";
import type { MockFn } from "../test-utils/vitest-mock-fn.js";
export const baseConfigSnapshot = {
path: "/tmp/openclaw.json",
exists: true,
raw: "{}",
parsed: {},
valid: true,
config: {},
issues: [],
legacyIssues: [],
};
export type TestRuntime = {
log: MockFn;
error: MockFn;
exit: MockFn;
};
export function createTestRuntime(): TestRuntime {
return {
log: vi.fn(),
error: vi.fn(),
exit: vi.fn(),
};
}