@@ -24,10 +24,8 @@ import Olm from "@matrix-org/olm";
24
24
25
25
import * as testUtils from "../../test-utils/test-utils" ;
26
26
import {
27
- CRYPTO_BACKENDS ,
28
27
emitPromise ,
29
28
getSyncResponse ,
30
- InitCrypto ,
31
29
mkEventCustom ,
32
30
mkMembershipCustom ,
33
31
syncPromise ,
@@ -209,7 +207,7 @@ async function expectSendMegolmMessage(
209
207
return JSON . parse ( r . plaintext ) ;
210
208
}
211
209
212
- describe . each ( Object . entries ( CRYPTO_BACKENDS ) ) ( "crypto (%s) " , ( backend : string , initCrypto : InitCrypto ) => {
210
+ describe ( "crypto" , ( ) => {
213
211
if ( ! globalThis . Olm ) {
214
212
// currently we use libolm to implement the crypto in the tests, so need it to be present.
215
213
logger . warn ( "not running megolm tests: Olm not present" ) ;
@@ -369,7 +367,7 @@ describe.each(Object.entries(CRYPTO_BACKENDS))("crypto (%s)", (backend: string,
369
367
keyReceiver = new E2EKeyReceiver ( homeserverUrl ) ;
370
368
syncResponder = new SyncResponder ( homeserverUrl ) ;
371
369
372
- await initCrypto ( aliceClient ) ;
370
+ await aliceClient . initRustCrypto ( ) ;
373
371
374
372
// create a test olm device which we will use to communicate with alice. We use libolm to implement this.
375
373
testOlmAccount = await createOlmAccount ( ) ;
@@ -2441,7 +2439,7 @@ describe.each(Object.entries(CRYPTO_BACKENDS))("crypto (%s)", (backend: string,
2441
2439
// For legacy crypto, these tests only work with a proper persistent cryptoStore.
2442
2440
cryptoStore : new IndexedDBCryptoStore ( indexedDB , "test" ) ,
2443
2441
} ) ;
2444
- await initCrypto ( client ) ;
2442
+ await client . initRustCrypto ( ) ;
2445
2443
mockInitialApiRequests ( client . getHomeserverUrl ( ) ) ;
2446
2444
return client ;
2447
2445
}
0 commit comments