You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-12-04 05:02:41 +03:00
get rid of bunch of seemingly pointless waits
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
@@ -324,14 +324,8 @@ describe("Crypto", function() {
|
|||||||
expect(aliceClient.sendToDevice).toBeCalledTimes(1);
|
expect(aliceClient.sendToDevice).toBeCalledTimes(1);
|
||||||
const txnId = aliceClient.sendToDevice.mock.calls[0][2];
|
const txnId = aliceClient.sendToDevice.mock.calls[0][2];
|
||||||
|
|
||||||
// give the room key request manager time to update the state
|
|
||||||
// of the request
|
|
||||||
await Promise.resolve();
|
|
||||||
|
|
||||||
// cancel and resend the room key request
|
// cancel and resend the room key request
|
||||||
await aliceClient.cancelAndResendEventRoomKeyRequest(event);
|
await aliceClient.cancelAndResendEventRoomKeyRequest(event);
|
||||||
jest.runAllTimers();
|
|
||||||
await Promise.resolve();
|
|
||||||
// cancelAndResend will call sendToDevice twice:
|
// cancelAndResend will call sendToDevice twice:
|
||||||
// the first call to sendToDevice will be the cancellation
|
// the first call to sendToDevice will be the cancellation
|
||||||
// the second call to sendToDevice will be the key request
|
// the second call to sendToDevice will be the key request
|
||||||
|
|||||||
Reference in New Issue
Block a user