mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 21:24:31 +00:00
chore: Fix types in tests 27/N.
This commit is contained in:
@@ -11,6 +11,18 @@ import {
|
||||
|
||||
installWebAutoReplyTestHomeHooks();
|
||||
|
||||
function createMockListener() {
|
||||
return {
|
||||
close: vi.fn(async () => undefined),
|
||||
onClose: new Promise<import("./inbound.js").WebListenerCloseReason>(() => {}),
|
||||
signalClose: vi.fn(),
|
||||
sendMessage: vi.fn(async () => ({ messageId: "msg-1" })),
|
||||
sendPoll: vi.fn(async () => ({ messageId: "poll-1" })),
|
||||
sendReaction: vi.fn(async () => undefined),
|
||||
sendComposingTo: vi.fn(async () => undefined),
|
||||
};
|
||||
}
|
||||
|
||||
describe("typing controller idle", () => {
|
||||
installWebAutoReplyUnitTestHooks();
|
||||
|
||||
@@ -53,11 +65,12 @@ describe("typing controller idle", () => {
|
||||
timestamp: Date.now(),
|
||||
chatType: "direct",
|
||||
chatId: "direct:+1000",
|
||||
accountId: "default",
|
||||
sendComposing,
|
||||
reply,
|
||||
sendMedia,
|
||||
});
|
||||
return { close: vi.fn().mockResolvedValue(undefined) };
|
||||
return createMockListener();
|
||||
},
|
||||
false,
|
||||
replyResolver,
|
||||
|
||||
Reference in New Issue
Block a user