From 88f22b34ea280380224dccc867422d22b316b656 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Wed, 6 May 2026 20:19:44 -0700 Subject: [PATCH] test(telegram): type reaction body mock --- .../src/bot-message-context.reactions.test.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/extensions/telegram/src/bot-message-context.reactions.test.ts b/extensions/telegram/src/bot-message-context.reactions.test.ts index 2ba426cb6cf..3c24317afdd 100644 --- a/extensions/telegram/src/bot-message-context.reactions.test.ts +++ b/extensions/telegram/src/bot-message-context.reactions.test.ts @@ -1,8 +1,20 @@ import { beforeEach, describe, expect, it, vi } from "vitest"; import type { BuildTelegramMessageContextParams } from "./bot-message-context.types.js"; +type InboundBodyMock = (arg: unknown) => Promise<{ + bodyText: string; + rawBody: string; + historyKey: undefined; + commandAuthorized: boolean; + effectiveWasMentioned: boolean; + canDetectMention: boolean; + shouldBypassMention: boolean; + stickerCacheHit: boolean; + locationData: undefined; +}>; + const inboundBodyMock = vi.hoisted(() => - vi.fn(async () => ({ + vi.fn(async () => ({ bodyText: "hello", rawBody: "hello", historyKey: undefined,