mirror of
https://github.com/moltbot/moltbot.git
synced 2026-03-07 22:44:16 +00:00
test(types): annotate cron gateway mock openclaw#20054 thanks @mbelinky
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
import { vi } from "vitest";
|
||||
|
||||
export const callGatewayMock = vi.fn();
|
||||
type GatewayMockFn = ((opts: unknown) => unknown) & {
|
||||
mockReset: () => void;
|
||||
mockResolvedValue: (value: unknown) => void;
|
||||
};
|
||||
|
||||
export const callGatewayMock = vi.fn() as GatewayMockFn;
|
||||
|
||||
vi.mock("../../gateway/call.js", () => ({
|
||||
callGateway: (opts: unknown) => callGatewayMock(opts),
|
||||
|
||||
Reference in New Issue
Block a user