Skip to content

Commit 99523d2

Browse files
committed
test: add a flushPromises
this seems to be needed because `initRustCrypto` now ends up doing slightly less awaiting
1 parent be15a70 commit 99523d2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

spec/unit/rust-crypto/rust-crypto.spec.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ import encryptAESSecretStorageItem from "../../../src/utils/encryptAESSecretStor
7777
import { type CryptoStore, type SecretStorePrivateKeys } from "../../../src/crypto/store/base";
7878
import { CryptoEvent } from "../../../src/crypto-api/index.ts";
7979
import { RustBackupManager } from "../../../src/rust-crypto/backup.ts";
80+
import { flushPromises } from "../../test-utils/flushPromises.ts";
8081

8182
const TEST_USER = "@alice:example.com";
8283
const TEST_DEVICE_ID = "TEST_DEVICE";
@@ -2302,6 +2303,8 @@ describe("RustCrypto", () => {
23022303
});
23032304

23042305
const rustCrypto = await makeTestRustCrypto(makeMatrixHttpApi(), undefined, undefined, secretStorage);
2306+
await flushPromises();
2307+
23052308
// We have a key backup
23062309
expect(await rustCrypto.getActiveSessionBackupVersion()).not.toBeNull();
23072310

0 commit comments

Comments
 (0)