fix(ci): narrow telegram route test seams

This commit is contained in:
Vincent Koc 2026-03-31 23:36:12 +09:00
parent 461a3a4052
commit 983891a603
3 changed files with 30 additions and 2 deletions

View File

@ -11,6 +11,20 @@ vi.mock("openclaw/plugin-sdk/conversation-runtime", async (importOriginal) => {
};
});
vi.mock("./bot-message-context.body.js", () => ({
resolveTelegramInboundBody: async () => ({
bodyText: "hello",
rawBody: "hello",
historyKey: undefined,
commandAuthorized: false,
effectiveWasMentioned: true,
canDetectMention: false,
shouldBypassMention: false,
stickerCacheHit: false,
locationData: undefined,
}),
}));
const { buildTelegramMessageContextForTest } =
await import("./bot-message-context.test-harness.js");
const { clearRuntimeConfigSnapshot, setRuntimeConfigSnapshot } =

View File

@ -5,6 +5,20 @@ import {
recordInboundSessionMock,
} from "./bot-message-context.route-test-support.js";
vi.mock("./bot-message-context.body.js", () => ({
resolveTelegramInboundBody: async () => ({
bodyText: "hello",
rawBody: "hello",
historyKey: undefined,
commandAuthorized: false,
effectiveWasMentioned: true,
canDetectMention: false,
shouldBypassMention: false,
stickerCacheHit: false,
locationData: undefined,
}),
}));
let buildTelegramMessageContextForTest: typeof import("./bot-message-context.test-harness.js").buildTelegramMessageContextForTest;
let clearRuntimeConfigSnapshot: typeof import("openclaw/plugin-sdk/config-runtime").clearRuntimeConfigSnapshot;

View File

@ -121,7 +121,7 @@
"durationMs": 1600
},
"extensions/telegram/src/bot-message-context.dm-threads.test.ts": {
"durationMs": 60770
"durationMs": 23020
},
"extensions/whatsapp/src/inbound/access-control.test.ts": {
"durationMs": 1600
@ -241,7 +241,7 @@
"durationMs": 610
},
"extensions/telegram/src/bot-message-context.dm-topic-threadid.test.ts": {
"durationMs": 73540
"durationMs": 31390
},
"extensions/slack/src/monitor.threading.missing-thread-ts.test.ts": {
"durationMs": 570