small refactor to make it testable.

This commit is contained in:
Timo K
2025-12-15 20:17:57 +01:00
parent 909d980dff
commit 5bc6ed5885
8 changed files with 134 additions and 60 deletions

View File

@@ -22,6 +22,7 @@ import { ECConnectionFactory } from "./ConnectionFactory.ts";
import { type OpenIDClientParts } from "../../../livekit/openIDSFU.ts";
import {
mockCallMembership,
mockComputeLivekitParticipantIdentity$,
mockMediaDevices,
withTestScheduler,
} from "../../../utils/test.ts";
@@ -43,6 +44,11 @@ let lkRoomFactory: () => LivekitRoom;
const createdMockLivekitRooms: Map<string, LivekitRoom> = new Map();
vi.mock(import("./LivekitParticipantIdentity.ts"), async (importOriginal) => ({
...(await importOriginal()),
computeLivekitParticipantIdentity$: mockComputeLivekitParticipantIdentity$,
}));
beforeEach(() => {
testScope = new ObservableScope();
mockClient = {