mirror of https://github.com/openclaw/openclaw.git
fix(ci): rebalance telegram dm thread tests
This commit is contained in:
parent
177687ae29
commit
7c4bffdecd
|
|
@ -1,4 +1,16 @@
|
|||
import { afterEach, beforeEach, describe, expect, it } from "vitest";
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
const { recordInboundSessionMock } = vi.hoisted(() => ({
|
||||
recordInboundSessionMock: vi.fn().mockResolvedValue(undefined),
|
||||
}));
|
||||
|
||||
vi.mock("openclaw/plugin-sdk/conversation-runtime", async (importOriginal) => {
|
||||
const actual = await importOriginal<typeof import("openclaw/plugin-sdk/conversation-runtime")>();
|
||||
return {
|
||||
...actual,
|
||||
recordInboundSession: (...args: unknown[]) => recordInboundSessionMock(...args),
|
||||
};
|
||||
});
|
||||
|
||||
const { buildTelegramMessageContextForTest } =
|
||||
await import("./bot-message-context.test-harness.js");
|
||||
const { clearRuntimeConfigSnapshot, setRuntimeConfigSnapshot } =
|
||||
|
|
@ -10,6 +22,7 @@ beforeEach(() => {
|
|||
|
||||
afterEach(() => {
|
||||
clearRuntimeConfigSnapshot();
|
||||
recordInboundSessionMock.mockClear();
|
||||
});
|
||||
|
||||
describe("buildTelegramMessageContext dm thread sessions", () => {
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@
|
|||
"durationMs": 1600
|
||||
},
|
||||
"extensions/telegram/src/bot-message-context.dm-threads.test.ts": {
|
||||
"durationMs": 1600
|
||||
"durationMs": 60770
|
||||
},
|
||||
"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": 581
|
||||
"durationMs": 73540
|
||||
},
|
||||
"extensions/slack/src/monitor.threading.missing-thread-ts.test.ts": {
|
||||
"durationMs": 570
|
||||
|
|
|
|||
Loading…
Reference in New Issue