mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-30 04:36:04 +00:00
test: dedupe fixtures and test harness setup
This commit is contained in:
12
extensions/test-utils/runtime-env.ts
Normal file
12
extensions/test-utils/runtime-env.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
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}`);
|
||||
}),
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user