From d901e218042aa7bd4f3d72730ac2d990ef491a3e Mon Sep 17 00:00:00 2001 From: Robin Date: Sun, 19 Jan 2025 21:12:26 -0500 Subject: [PATCH] Assert that the request to the JWT service looks right --- src/livekit/openIDSFU.test.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/livekit/openIDSFU.test.ts b/src/livekit/openIDSFU.test.ts index 320b12c6..17806e45 100644 --- a/src/livekit/openIDSFU.test.ts +++ b/src/livekit/openIDSFU.test.ts @@ -47,6 +47,17 @@ test("getSFUConfigWithOpenID gets the JWT token", async () => { jwt: "JWT token", url: "LiveKit URL", }); + expect(fetch).toHaveBeenCalledWith("LiveKit service URL/sfu/get", { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ + room: "LiveKit alias", + openid_token: {}, + device_id: "Device ID", + }), + }); }); });