Skip to content

Commit a587d7c

Browse files
committedSep 28, 2022
1 parent b64a30f commit a587d7c

30 files changed

+1375
-79
lines changed
 

‎spec/integ/matrix-client-crypto.spec.ts

+6
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,7 @@ describe("MatrixClient crypto", () => {
494494
aliTestClient.expectKeyQuery({ device_keys: { [aliUserId]: {} }, failures: {} });
495495
await aliTestClient.start();
496496
await bobTestClient.start();
497+
bobTestClient.client.crypto.deviceList.downloadKeys = () => Promise.resolve({});
497498
await firstSync(aliTestClient);
498499
await aliEnablesEncryption();
499500
await aliSendsFirstMessage();
@@ -504,6 +505,7 @@ describe("MatrixClient crypto", () => {
504505
aliTestClient.expectKeyQuery({ device_keys: { [aliUserId]: {} }, failures: {} });
505506
await aliTestClient.start();
506507
await bobTestClient.start();
508+
bobTestClient.client.crypto.deviceList.downloadKeys = () => Promise.resolve({});
507509
await firstSync(aliTestClient);
508510
await aliEnablesEncryption();
509511
await aliSendsFirstMessage();
@@ -567,6 +569,7 @@ describe("MatrixClient crypto", () => {
567569
aliTestClient.expectKeyQuery({ device_keys: { [aliUserId]: {} }, failures: {} });
568570
await aliTestClient.start();
569571
await bobTestClient.start();
572+
bobTestClient.client.crypto.deviceList.downloadKeys = () => Promise.resolve({});
570573
await firstSync(aliTestClient);
571574
await aliEnablesEncryption();
572575
await aliSendsFirstMessage();
@@ -584,6 +587,9 @@ describe("MatrixClient crypto", () => {
584587
await firstSync(bobTestClient);
585588
await aliEnablesEncryption();
586589
await aliSendsFirstMessage();
590+
bobTestClient.httpBackend.when('POST', '/keys/query').respond(
591+
200, {},
592+
);
587593
await bobRecvMessage();
588594
await bobEnablesEncryption();
589595
const ciphertext = await bobSendsReplyMessage();

‎spec/integ/matrix-client-syncing.spec.ts

+2
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ describe("MatrixClient syncing", () => {
8787
});
8888

8989
it("should emit RoomEvent.MyMembership for invite->leave->invite cycles", async () => {
90+
await client.initCrypto();
91+
9092
const roomId = "!cycles:example.org";
9193

9294
// First sync: an invite

0 commit comments

Comments
 (0)