mirror of https://github.com/openclaw/openclaw.git
fix(ci): narrow telegram route test seams
This commit is contained in:
parent
461a3a4052
commit
983891a603
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue