mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-30 20:30:20 +00:00
fix(ci): default local low-memory checks
This commit is contained in:
@@ -6,8 +6,14 @@ import {
|
||||
createTestDraftStream,
|
||||
} from "./draft-stream.test-helpers.js";
|
||||
|
||||
type DispatchReplyWithBufferedBlockDispatcherArgs = Parameters<
|
||||
TelegramBotDeps["dispatchReplyWithBufferedBlockDispatcher"]
|
||||
>[0];
|
||||
|
||||
const createTelegramDraftStream = vi.hoisted(() => vi.fn());
|
||||
const dispatchReplyWithBufferedBlockDispatcher = vi.hoisted(() => vi.fn());
|
||||
const dispatchReplyWithBufferedBlockDispatcher = vi.hoisted(() =>
|
||||
vi.fn<(params: DispatchReplyWithBufferedBlockDispatcherArgs) => Promise<unknown>>(),
|
||||
);
|
||||
const deliverReplies = vi.hoisted(() => vi.fn());
|
||||
const emitInternalMessageSentHook = vi.hoisted(() => vi.fn());
|
||||
const createForumTopicTelegram = vi.hoisted(() => vi.fn());
|
||||
@@ -2113,7 +2119,7 @@ describe("dispatchTelegramMessage draft streaming", () => {
|
||||
const draftStream = createDraftStream(999);
|
||||
createTelegramDraftStream.mockReturnValue(draftStream);
|
||||
dispatchReplyWithBufferedBlockDispatcher.mockImplementation(async ({ dispatcherOptions }) => {
|
||||
dispatcherOptions.onSkip?.({ text: "" }, { reason: "no_reply", kind: "final" });
|
||||
dispatcherOptions.onSkip?.({ text: "" }, { reason: "empty", kind: "final" });
|
||||
return { queuedFinal: false };
|
||||
});
|
||||
deliverReplies.mockResolvedValueOnce({ delivered: true });
|
||||
@@ -2139,7 +2145,7 @@ describe("dispatchTelegramMessage draft streaming", () => {
|
||||
try {
|
||||
await dispatcherOptions.deliver({ text: "Hello" }, { kind: "final" });
|
||||
} catch (err) {
|
||||
dispatcherOptions.onError(err, { kind: "final" });
|
||||
dispatcherOptions.onError?.(err, { kind: "final" });
|
||||
}
|
||||
return { queuedFinal: false };
|
||||
});
|
||||
@@ -2167,7 +2173,7 @@ describe("dispatchTelegramMessage draft streaming", () => {
|
||||
try {
|
||||
await dispatcherOptions.deliver({ text: "Hello" }, { kind: "final" });
|
||||
} catch (err) {
|
||||
dispatcherOptions.onError(err, { kind: "final" });
|
||||
dispatcherOptions.onError?.(err, { kind: "final" });
|
||||
}
|
||||
return { queuedFinal: false };
|
||||
});
|
||||
@@ -2231,7 +2237,7 @@ describe("dispatchTelegramMessage draft streaming", () => {
|
||||
try {
|
||||
await dispatcherOptions.deliver({ text: "Hello" }, { kind: "final" });
|
||||
} catch (err) {
|
||||
dispatcherOptions.onError(err, { kind: "final" });
|
||||
dispatcherOptions.onError?.(err, { kind: "final" });
|
||||
}
|
||||
return { queuedFinal: false };
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user