Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

test(mcp): account for abort signal in device flow fetch assertion

Tind7e3f397b591
diff --git a/packages/mcp/src/auth/device-flow.test.ts b/packages/mcp/src/auth/device-flow.test.ts
index 746b21727..8d1eb3bc8 100644
--- a/packages/mcp/src/auth/device-flow.test.ts
+++ b/packages/mcp/src/auth/device-flow.test.ts
@@ -31,11 +31,12 @@ describe("requestDeviceCode", () => {
expect(result.device_code).toBe("device-code");
expect(fetchMock).toHaveBeenCalledWith(
"https://api.example.com/api/auth/device/code",
- {
+ expect.objectContaining({
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ client_id: "kaneo-mcp" }),
- },
+ signal: expect.any(AbortSignal),
+ }),
);
});