Skip to content

Commit 339a672

Browse files
committed
test: clear msteams gate drift for gateway probe auth landing (openclaw#52513) (thanks @CodeForgeNet)
1 parent 24f77d7 commit 339a672

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

extensions/msteams/src/webhook-timeouts.test.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,30 @@
1+
import type { Server } from "node:http";
12
import { describe, expect, it, vi } from "vitest";
23
import { applyMSTeamsWebhookTimeouts } from "./webhook-timeouts.js";
34

45
describe("applyMSTeamsWebhookTimeouts", () => {
56
it("applies default timeouts and header clamp", () => {
6-
const httpServer = {
7+
const httpServer: Pick<Server, "setTimeout" | "requestTimeout" | "headersTimeout"> = {
78
setTimeout: vi.fn(),
89
requestTimeout: 0,
910
headersTimeout: 0,
10-
} as never;
11+
};
1112

12-
applyMSTeamsWebhookTimeouts(httpServer);
13+
applyMSTeamsWebhookTimeouts(httpServer as Server);
1314

1415
expect(httpServer.setTimeout).toHaveBeenCalledWith(30_000);
1516
expect(httpServer.requestTimeout).toBe(30_000);
1617
expect(httpServer.headersTimeout).toBe(15_000);
1718
});
1819

1920
it("uses explicit overrides and clamps headers timeout to request timeout", () => {
20-
const httpServer = {
21+
const httpServer: Pick<Server, "setTimeout" | "requestTimeout" | "headersTimeout"> = {
2122
setTimeout: vi.fn(),
2223
requestTimeout: 0,
2324
headersTimeout: 0,
24-
} as never;
25+
};
2526

26-
applyMSTeamsWebhookTimeouts(httpServer, {
27+
applyMSTeamsWebhookTimeouts(httpServer as Server, {
2728
inactivityTimeoutMs: 12_000,
2829
requestTimeoutMs: 9_000,
2930
headersTimeoutMs: 15_000,

0 commit comments

Comments
 (0)