chore: Fix types in tests 27/N.

This commit is contained in:
cpojer
2026-02-17 14:31:55 +09:00
parent 4235435309
commit 97c8f4999e
15 changed files with 129 additions and 51 deletions

View File

@@ -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,