diff --git a/test/CallHandler-test.ts b/test/CallHandler-test.ts index f7e2c27993..4b326cde25 100644 --- a/test/CallHandler-test.ts +++ b/test/CallHandler-test.ts @@ -172,7 +172,7 @@ describe('CallHandler', () => { let callRoomChangeEventCount = 0; const roomChangePromise = new Promise(resolve => { - CallHandler.sharedInstance().addListener(CallHandlerEvent.CallChangeRoom, () => { + callHandler.addListener(CallHandlerEvent.CallChangeRoom, () => { ++callRoomChangeEventCount; resolve(); }); @@ -200,7 +200,7 @@ describe('CallHandler', () => { await roomChangePromise; dis.unregister(dispatchHandle); - CallHandler.sharedInstance().removeAllListeners(); + callHandler.removeAllListeners(); // If everything's gone well, we should have seen only one room change // event and the call should now be in user 3's room.