diff --git a/extensions/msteams/src/webhook-timeouts.test.ts b/extensions/msteams/src/webhook-timeouts.test.ts index 76d350acd35..c5780c9ce73 100644 --- a/extensions/msteams/src/webhook-timeouts.test.ts +++ b/extensions/msteams/src/webhook-timeouts.test.ts @@ -1,15 +1,16 @@ +import type { Server } from "node:http"; import { describe, expect, it, vi } from "vitest"; import { applyMSTeamsWebhookTimeouts } from "./webhook-timeouts.js"; describe("applyMSTeamsWebhookTimeouts", () => { it("applies default timeouts and header clamp", () => { - const httpServer = { + const httpServer: Pick = { setTimeout: vi.fn(), requestTimeout: 0, headersTimeout: 0, - } as never; + }; - applyMSTeamsWebhookTimeouts(httpServer); + applyMSTeamsWebhookTimeouts(httpServer as Server); expect(httpServer.setTimeout).toHaveBeenCalledWith(30_000); expect(httpServer.requestTimeout).toBe(30_000); @@ -17,13 +18,13 @@ describe("applyMSTeamsWebhookTimeouts", () => { }); it("uses explicit overrides and clamps headers timeout to request timeout", () => { - const httpServer = { + const httpServer: Pick = { setTimeout: vi.fn(), requestTimeout: 0, headersTimeout: 0, - } as never; + }; - applyMSTeamsWebhookTimeouts(httpServer, { + applyMSTeamsWebhookTimeouts(httpServer as Server, { inactivityTimeoutMs: 12_000, requestTimeoutMs: 9_000, headersTimeoutMs: 15_000,