mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-05 01:30:21 +00:00
fix(ci): narrow telegram route test seams
This commit is contained in:
@@ -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 } =
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user