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

Commit

Permalink
Update test interface to add call object (#10477)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbkr authored Mar 30, 2023
1 parent 232daaf commit 15523cd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/LegacyCallHandler-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ describe("LegacyCallHandler", () => {
fakeCall!.getRemoteAssertedIdentity = jest.fn().mockReturnValue({
id: NATIVE_BOB,
});
fakeCall!.emit(CallEvent.AssertedIdentityChanged);
fakeCall!.emit(CallEvent.AssertedIdentityChanged, fakeCall);

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

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

// call added to call map
expect(callHandler.getCallForRoom(roomId)).toEqual(call);
call.emit(CallEvent.State, CallState.Ringing, CallState.Connected);
call.emit(CallEvent.State, CallState.Ringing, CallState.Connected, fakeCall);

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

// call added to call map
expect(callHandler.getCallForRoom(roomId)).toEqual(call);
call.emit(CallEvent.State, CallState.Ringing, CallState.Connected);
call.emit(CallEvent.State, CallState.Ringing, CallState.Connected, fakeCall);

// ringer audio element started
expect(mockAudioElement.play).not.toHaveBeenCalled();
Expand Down

0 comments on commit 15523cd

Please sign in to comment.