mirror of
https://github.com/moltbot/moltbot.git
synced 2026-03-08 06:54:24 +00:00
13 lines
280 B
TypeScript
13 lines
280 B
TypeScript
import type { RuntimeEnv } from "openclaw/plugin-sdk";
|
|
import { vi } from "vitest";
|
|
|
|
export function createRuntimeEnv(): RuntimeEnv {
|
|
return {
|
|
log: vi.fn(),
|
|
error: vi.fn(),
|
|
exit: vi.fn((code: number): never => {
|
|
throw new Error(`exit ${code}`);
|
|
}),
|
|
};
|
|
}
|