mirror of https://github.com/vector-im/riot-web
Use CallHandler correctly
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>pull/21833/head
parent
653591e806
commit
b6324a816f
|
@ -172,7 +172,7 @@ describe('CallHandler', () => {
|
||||||
|
|
||||||
let callRoomChangeEventCount = 0;
|
let callRoomChangeEventCount = 0;
|
||||||
const roomChangePromise = new Promise<void>(resolve => {
|
const roomChangePromise = new Promise<void>(resolve => {
|
||||||
CallHandler.sharedInstance().addListener(CallHandlerEvent.CallChangeRoom, () => {
|
callHandler.addListener(CallHandlerEvent.CallChangeRoom, () => {
|
||||||
++callRoomChangeEventCount;
|
++callRoomChangeEventCount;
|
||||||
resolve();
|
resolve();
|
||||||
});
|
});
|
||||||
|
@ -200,7 +200,7 @@ describe('CallHandler', () => {
|
||||||
|
|
||||||
await roomChangePromise;
|
await roomChangePromise;
|
||||||
dis.unregister(dispatchHandle);
|
dis.unregister(dispatchHandle);
|
||||||
CallHandler.sharedInstance().removeAllListeners();
|
callHandler.removeAllListeners();
|
||||||
|
|
||||||
// If everything's gone well, we should have seen only one room change
|
// 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.
|
// event and the call should now be in user 3's room.
|
||||||
|
|
Loading…
Reference in New Issue