fix: normalize abort signals for telegram fetch
This commit is contained in:
@@ -164,12 +164,10 @@ describe("sendMessageTelegram", () => {
|
||||
});
|
||||
try {
|
||||
await sendMessageTelegram("123", "hi", { token: "tok" });
|
||||
expect(botCtorSpy).toHaveBeenCalledWith(
|
||||
"tok",
|
||||
expect.objectContaining({
|
||||
client: expect.objectContaining({ fetch: fetchSpy }),
|
||||
}),
|
||||
);
|
||||
const clientFetch = (botCtorSpy.mock.calls[0]?.[1] as { client?: { fetch?: unknown } })
|
||||
?.client?.fetch;
|
||||
expect(clientFetch).toBeTypeOf("function");
|
||||
expect(clientFetch).not.toBe(fetchSpy);
|
||||
} finally {
|
||||
globalThis.fetch = originalFetch;
|
||||
if (originalBun === undefined) {
|
||||
|
||||
Reference in New Issue
Block a user