test: speed up telegram suites

This commit is contained in:
Peter Steinberger
2026-02-01 22:21:26 +00:00
parent bcde2fca5a
commit 9d2784cdb9
17 changed files with 426 additions and 471 deletions
@@ -596,16 +596,12 @@ describe("sendStickerTelegram", () => {
expect(res.chatId).toBe(chatId);
});
it("throws error when fileId is empty", async () => {
await expect(sendStickerTelegram("123", "", { token: "tok" })).rejects.toThrow(
/file_id is required/i,
);
});
it("throws error when fileId is whitespace only", async () => {
await expect(sendStickerTelegram("123", " ", { token: "tok" })).rejects.toThrow(
/file_id is required/i,
);
it("throws error when fileId is blank", async () => {
for (const fileId of ["", " "]) {
await expect(sendStickerTelegram("123", fileId, { token: "tok" })).rejects.toThrow(
/file_id is required/i,
);
}
});
it("includes message_thread_id for forum topic messages", async () => {