fix test not checking for livekit connection state anymore.

This commit is contained in:
Timo K
2025-12-10 19:18:16 +01:00
parent 1941fc9ca1
commit 667a3d0e3d

View File

@@ -98,7 +98,7 @@ describe("Publisher", () => {
).mockRejectedValue(Error("testError"));
await expect(publisher.startPublishing()).rejects.toThrow(
new FailToStartLivekitConnection("testError"),
new Error("testError"),
);
// does not try other conenction after the first one failed
@@ -106,17 +106,6 @@ describe("Publisher", () => {
connection.livekitRoom.localParticipant.publishTrack,
).toHaveBeenCalledTimes(1);
// failiour due to connection.state$
const beforeState = connection.state$.value;
(connection.state$ as BehaviorSubject<Error>).next(Error("testStartError"));
await expect(publisher.startPublishing()).rejects.toThrow(
new FailToStartLivekitConnection("testStartError"),
);
(connection.state$ as BehaviorSubject<ConnectionState | Error>).next(
beforeState,
);
// does not try other conenction after the first one failed
expect(
connection.livekitRoom.localParticipant.publishTrack,