mirror of
https://github.com/vector-im/element-call.git
synced 2026-05-01 09:54:37 +00:00
fix tests after moving to pnpm
This commit is contained in:
@@ -15,6 +15,7 @@ import {
|
||||
vitest,
|
||||
} from "vitest";
|
||||
import {
|
||||
EventType,
|
||||
MatrixEvent,
|
||||
type Room as MatrixRoom,
|
||||
type Room,
|
||||
@@ -255,6 +256,7 @@ export function mockRtcMembership(
|
||||
const event = new MatrixEvent({
|
||||
sender: userId,
|
||||
event_id: `$-ev-${randomUUID()}:example.org`,
|
||||
type: EventType.GroupCallMemberPrefix,
|
||||
content: data,
|
||||
});
|
||||
|
||||
@@ -466,7 +468,9 @@ export class MockRTCSession extends TypedEventEmitter<
|
||||
counters: {},
|
||||
};
|
||||
|
||||
public leaveRoomSession = vitest.fn().mockResolvedValue(undefined);
|
||||
public leaveRoomSession: ReturnType<typeof vitest.fn> = vitest
|
||||
.fn()
|
||||
.mockResolvedValue(undefined);
|
||||
|
||||
public constructor(
|
||||
public readonly room: Room,
|
||||
@@ -496,7 +500,7 @@ export class MockRTCSession extends TypedEventEmitter<
|
||||
return this;
|
||||
}
|
||||
|
||||
public updateCallIntent = vitest
|
||||
public updateCallIntent: ReturnType<typeof vitest.fn> = vitest
|
||||
.fn()
|
||||
.mockImplementation(async () => Promise.resolve());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user