You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-08-07 23:02:56 +03:00
Refactor/simplify Promises in MatrixRTCSession (#4466)
* Refactor/simplify Promises in MatrixRTCSession * Update src/matrixrtc/MatrixRTCSession.ts Co-authored-by: Hugh Nimmo-Smith <hughns@users.noreply.github.com> * Fix+document+test leaveRoomSession's return value * Throw instead of using expect in teardown because lint rules forbid using expect outside of test functions --------- Co-authored-by: Hugh Nimmo-Smith <hughns@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
23c4c9fd8a
commit
b99ff83785
@@ -419,9 +419,13 @@ describe("MatrixRTCSession", () => {
|
||||
sess = MatrixRTCSession.roomSessionForRoom(client, mockRoom);
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
afterEach(async () => {
|
||||
const wasJoined = sess!.isJoined();
|
||||
// stop the timers
|
||||
sess!.leaveRoomSession();
|
||||
const left = await sess!.leaveRoomSession();
|
||||
if (left !== wasJoined) {
|
||||
throw new Error(`Unexpected leave result: wanted ${wasJoined}, got ${left}`);
|
||||
}
|
||||
});
|
||||
|
||||
it("starts un-joined", () => {
|
||||
|
Reference in New Issue
Block a user