style: format telegram poll test

This commit is contained in:
Peter Steinberger 2026-02-14 18:29:34 +01:00
parent 7bcb3de6da
commit 5ac85539e7
1 changed files with 8 additions and 7 deletions

View File

@ -23,12 +23,14 @@ describe("sendPollTelegram", () => {
it("retries without message_thread_id on thread-not-found", async () => {
const api = {
sendPoll: vi.fn(async (_chatId: string, _question: string, _options: string[], params: any) => {
if (params?.message_thread_id) {
throw new Error("400: Bad Request: message thread not found");
}
return { message_id: 1, chat: { id: 2 }, poll: { id: "p2" } };
}),
sendPoll: vi.fn(
async (_chatId: string, _question: string, _options: string[], params: any) => {
if (params?.message_thread_id) {
throw new Error("400: Bad Request: message thread not found");
}
return { message_id: 1, chat: { id: 2 }, poll: { id: "p2" } };
},
),
};
const res = await sendPollTelegram(
@ -57,4 +59,3 @@ describe("sendPollTelegram", () => {
expect(api.sendPoll).not.toHaveBeenCalled();
});
});