Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 15523cd

Browse files
authored
Update test interface to add call object (#10477)
Compatibility with matrix-org/matrix-js-sdk#3237
1 parent 232daaf commit 15523cd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/LegacyCallHandler-test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ describe("LegacyCallHandler", () => {
365365
fakeCall!.getRemoteAssertedIdentity = jest.fn().mockReturnValue({
366366
id: NATIVE_BOB,
367367
});
368-
fakeCall!.emit(CallEvent.AssertedIdentityChanged);
368+
fakeCall!.emit(CallEvent.AssertedIdentityChanged, fakeCall);
369369

370370
// Now set the config option
371371
SdkConfig.add({
@@ -378,7 +378,7 @@ describe("LegacyCallHandler", () => {
378378
fakeCall!.getRemoteAssertedIdentity = jest.fn().mockReturnValue({
379379
id: NATIVE_CHARLIE,
380380
});
381-
fakeCall!.emit(CallEvent.AssertedIdentityChanged);
381+
fakeCall!.emit(CallEvent.AssertedIdentityChanged, fakeCall);
382382

383383
await roomChangePromise;
384384
callHandler.removeAllListeners();
@@ -624,7 +624,7 @@ describe("LegacyCallHandler without third party protocols", () => {
624624

625625
// call added to call map
626626
expect(callHandler.getCallForRoom(roomId)).toEqual(call);
627-
call.emit(CallEvent.State, CallState.Ringing, CallState.Connected);
627+
call.emit(CallEvent.State, CallState.Ringing, CallState.Connected, fakeCall);
628628

629629
// ringer audio element started
630630
expect(mockAudioElement.play).toHaveBeenCalled();
@@ -641,7 +641,7 @@ describe("LegacyCallHandler without third party protocols", () => {
641641

642642
// call added to call map
643643
expect(callHandler.getCallForRoom(roomId)).toEqual(call);
644-
call.emit(CallEvent.State, CallState.Ringing, CallState.Connected);
644+
call.emit(CallEvent.State, CallState.Ringing, CallState.Connected, fakeCall);
645645

646646
// ringer audio element started
647647
expect(mockAudioElement.play).not.toHaveBeenCalled();

0 commit comments

Comments
 (0)