mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-14 19:40:40 +00:00
28 lines
475 B
TypeScript
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(),
|
|
};
|
|
}
|