mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-03 13:22:14 +00:00
fix(ci): rebalance telegram dm thread tests
This commit is contained in:
@@ -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", () => {
|
||||
|
||||
4
test/fixtures/test-timings.channels.json
vendored
4
test/fixtures/test-timings.channels.json
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user