From 869bab8253859dbaa667996ad56ebd45cdc9d852 Mon Sep 17 00:00:00 2001 From: Valere Date: Thu, 2 Apr 2026 16:51:40 +0200 Subject: [PATCH] fixup test since usage of doNetworkOperationWithRetry doNetworkOperationWithRetry requires to properly mock the get_token endpoint, whereas retryNetworkOperation didn't require it. --- .../CallViewModel/remoteMembers/Connection.test.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/state/CallViewModel/remoteMembers/Connection.test.ts b/src/state/CallViewModel/remoteMembers/Connection.test.ts index 2c89eef5..7ad5d775 100644 --- a/src/state/CallViewModel/remoteMembers/Connection.test.ts +++ b/src/state/CallViewModel/remoteMembers/Connection.test.ts @@ -8,6 +8,7 @@ Please see LICENSE in the repository root for full details. import { afterEach, + beforeEach, describe, expect, it, @@ -151,6 +152,19 @@ afterEach(() => { }); describe("Start connection states", () => { + beforeEach(() => { + fetchMock.post( + `https://matrix-rtc.example.org/livekit/jwt/get_token`, + () => { + return { + // Return a non-retryable error, if not, the retry logic will + // wait and fail the test with a timeout. + status: 404, + }; + }, + ); + }); + it("start in initialized state", () => { setupTest();