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;