fix tests after moving to pnpm

This commit is contained in:
fkwp
2026-04-17 11:13:41 +02:00
parent 9c1719a22f
commit 2b42b2bdc1
7 changed files with 82 additions and 8 deletions

View File

@@ -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());