Refactor to make encryption system available in view models (#2702)

This commit is contained in:
Hugh Nimmo-Smith
2024-11-04 09:11:44 +00:00
committed by GitHub
parent 19c4696a0d
commit f2ed07c258
5 changed files with 49 additions and 23 deletions

View File

@@ -20,6 +20,7 @@ import {
LocalUserMediaViewModel,
RemoteUserMediaViewModel,
} from "../state/MediaViewModel";
import { E2eeType } from "../e2ee/e2eeType";
export function withFakeTimers(continuation: () => void): void {
vi.useFakeTimers();
@@ -122,7 +123,9 @@ export async function withLocalMedia(
"local",
mockMember(member),
mockLocalParticipant({}),
true,
{
kind: E2eeType.PER_PARTICIPANT,
},
);
try {
await continuation(vm);
@@ -153,7 +156,9 @@ export async function withRemoteMedia(
"remote",
mockMember(member),
mockRemoteParticipant(participant),
true,
{
kind: E2eeType.PER_PARTICIPANT,
},
);
try {
await continuation(vm);