From bf45c176a7e623cc4b036c895966062e47711f2a Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 4 Dec 2019 23:42:16 +0000 Subject: [PATCH] get rid of bunch of seemingly pointless waits Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- spec/unit/crypto.spec.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/spec/unit/crypto.spec.js b/spec/unit/crypto.spec.js index c449d4624..fcaf5b6ec 100644 --- a/spec/unit/crypto.spec.js +++ b/spec/unit/crypto.spec.js @@ -324,14 +324,8 @@ describe("Crypto", function() { expect(aliceClient.sendToDevice).toBeCalledTimes(1); 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 await aliceClient.cancelAndResendEventRoomKeyRequest(event); - jest.runAllTimers(); - await Promise.resolve(); // cancelAndResend will call sendToDevice twice: // the first call to sendToDevice will be the cancellation // the second call to sendToDevice will be the key request