

























@@ -1220,20 +1220,19 @@ describe("createTelegramBot", () => {
12201220expect(replySpy).not.toHaveBeenCalled();
12211221expect(editMessageTextSpy).toHaveBeenCalledTimes(1);
12221222const [, , , params] = editMessageTextSpy.mock.calls[0] ?? [];
1223-const buttons = (
1223+const inlineKeyboard = (
12241224params as {
12251225reply_markup?: {
12261226inline_keyboard?: Array<Array<{ text?: string; callback_data?: string }>>;
12271227};
12281228}
1229-).reply_markup?.inline_keyboard?.flat();
1229+).reply_markup?.inline_keyboard;
123012301231-expect(buttons).toContainEqual({
1232-text: "GPT 4.1 Bridge",
1233-callback_data: "mdl_sel_openai/gpt-4.1",
1234-});
1235-const gpt5Button = buttons?.find((button) => button.callback_data === "mdl_sel_openai/gpt-5");
1236-expect(gpt5Button?.text?.replace(" ✓", "")).toBe("GPT Five Bridge");
1231+expect(inlineKeyboard).toStrictEqual([
1232+[{ text: "GPT 4.1 Bridge", callback_data: "mdl_sel_openai/gpt-4.1" }],
1233+[{ text: "GPT Five Bridge ✓", callback_data: "mdl_sel_openai/gpt-5" }],
1234+[{ text: "<< Back", callback_data: "mdl_back" }],
1235+]);
12371236expect(answerCallbackQuerySpy).toHaveBeenCalledWith("cbq-model-display-names-1");
12381237});
12391238此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。