mirror of
https://github.com/vector-im/element-call.git
synced 2026-02-08 04:19:11 +00:00
add more test for publisher
This commit is contained in:
@@ -136,12 +136,12 @@ export class FailToGetOpenIdToken extends ElementCallError {
|
||||
}
|
||||
|
||||
export class FailToStartLivekitConnection extends ElementCallError {
|
||||
public constructor() {
|
||||
public constructor(e?: string) {
|
||||
super(
|
||||
t("error.failed_to_start_livekit"),
|
||||
ErrorCode.FAILED_TO_START_LIVEKIT,
|
||||
ErrorCategory.NETWORK_CONNECTIVITY,
|
||||
undefined,
|
||||
e,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -284,6 +284,8 @@ export function mockLivekitRoom(
|
||||
): LivekitRoom {
|
||||
const livekitRoom = {
|
||||
options: {},
|
||||
setE2EEEnabled: vi.fn(),
|
||||
|
||||
...mockEmitter(),
|
||||
...room,
|
||||
} as Partial<LivekitRoom> as LivekitRoom;
|
||||
@@ -306,7 +308,9 @@ export function mockLocalParticipant(
|
||||
return {
|
||||
isLocal: true,
|
||||
trackPublications: new Map(),
|
||||
unpublishTracks: async () => Promise.resolve(),
|
||||
publishTrack: vi.fn(),
|
||||
unpublishTracks: vi.fn(),
|
||||
createTracks: vi.fn(),
|
||||
getTrackPublication: () =>
|
||||
({}) as Partial<LocalTrackPublication> as LocalTrackPublication,
|
||||
...mockEmitter(),
|
||||
|
||||
Reference in New Issue
Block a user