


























@@ -10,17 +10,29 @@ beforeAll(async () => {
1010describe("resolveTelegramAllowedUpdates", () => {
1111it("includes the default update types plus reaction and channel post support", () => {
1212const updates = resolveTelegramAllowedUpdates();
13-const expectedUpdates = [...DEFAULT_TELEGRAM_UPDATE_TYPES];
14-if (!expectedUpdates.includes("message_reaction")) {
15-expectedUpdates.push("message_reaction");
16-}
17-if (!expectedUpdates.includes("channel_post")) {
18-expectedUpdates.push("channel_post");
19-}
20-21-expect(updates).toEqual(expectedUpdates);
22-expect(updates).toContain("message_reaction");
23-expect(updates).toContain("channel_post");
24-expect(new Set(updates).size).toBe(updates.length);
13+expect(DEFAULT_TELEGRAM_UPDATE_TYPES).toEqual([
14+"message",
15+"edited_message",
16+"channel_post",
17+"edited_channel_post",
18+"business_connection",
19+"business_message",
20+"edited_business_message",
21+"deleted_business_messages",
22+"inline_query",
23+"chosen_inline_result",
24+"callback_query",
25+"shipping_query",
26+"pre_checkout_query",
27+"purchased_paid_media",
28+"poll",
29+"poll_answer",
30+"my_chat_member",
31+"managed_bot",
32+"chat_join_request",
33+"chat_boost",
34+"removed_chat_boost",
35+]);
36+expect(updates).toEqual([...DEFAULT_TELEGRAM_UPDATE_TYPES, "message_reaction"]);
2537});
2638});
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。