From e84b7acedd7c598adb0080cbb3d710d334375f9f Mon Sep 17 00:00:00 2001 From: Janne Mareike Koschinski Date: Fri, 21 Oct 2022 15:12:56 +0200 Subject: [PATCH] reduce amount of failing tests --- spec/integ/matrix-client-event-timeline.spec.ts | 2 ++ spec/integ/matrix-client-relations.spec.ts | 10 +++++----- src/client.ts | 8 ++++++-- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/spec/integ/matrix-client-event-timeline.spec.ts b/spec/integ/matrix-client-event-timeline.spec.ts index bc31b4d4e67..507c8150877 100644 --- a/spec/integ/matrix-client-event-timeline.spec.ts +++ b/spec/integ/matrix-client-event-timeline.spec.ts @@ -342,6 +342,8 @@ describe("MatrixClient event timelines", function() { httpBackend.verifyNoOutstandingExpectation(); client.stopClient(); Thread.setServerSideSupport(FeatureSupport.None); + Thread.setServerSideListSupport(FeatureSupport.None); + Thread.setServerSideFwdPaginationSupport(FeatureSupport.None); }); describe("getEventTimeline", function() { diff --git a/spec/integ/matrix-client-relations.spec.ts b/spec/integ/matrix-client-relations.spec.ts index 3a8a99fbff3..52f1efe22ab 100644 --- a/spec/integ/matrix-client-relations.spec.ts +++ b/spec/integ/matrix-client-relations.spec.ts @@ -60,7 +60,7 @@ describe("MatrixClient relations", () => { await httpBackend!.flushAllExpected(); - expect(await response).toEqual({ "events": [], "nextBatch": "NEXT" }); + expect(await response).toEqual({ "events": [], "nextBatch": "NEXT", "originalEvent": null, "prevBatch": null }); }); it("should read related events with relation type", async () => { @@ -72,7 +72,7 @@ describe("MatrixClient relations", () => { await httpBackend!.flushAllExpected(); - expect(await response).toEqual({ "events": [], "nextBatch": "NEXT" }); + expect(await response).toEqual({ "events": [], "nextBatch": "NEXT", "originalEvent": null, "prevBatch": null }); }); it("should read related events with relation type and event type", async () => { @@ -87,7 +87,7 @@ describe("MatrixClient relations", () => { await httpBackend!.flushAllExpected(); - expect(await response).toEqual({ "events": [], "nextBatch": "NEXT" }); + expect(await response).toEqual({ "events": [], "nextBatch": "NEXT", "originalEvent": null, "prevBatch": null }); }); it("should read related events with custom options", async () => { @@ -107,7 +107,7 @@ describe("MatrixClient relations", () => { await httpBackend!.flushAllExpected(); - expect(await response).toEqual({ "events": [], "nextBatch": "NEXT" }); + expect(await response).toEqual({ "events": [], "nextBatch": "NEXT", "originalEvent": null, "prevBatch": null }); }); it('should use default direction in the fetchRelations endpoint', async () => { @@ -122,6 +122,6 @@ describe("MatrixClient relations", () => { await httpBackend!.flushAllExpected(); - expect(await response).toEqual({ "chunk": [], "next_batch": "NEXT" }); + expect(await response).toEqual({ "chunk": [], "next_batch": "NEXT", "originalEvent": null, "prevBatch": null }); }); }); diff --git a/src/client.ts b/src/client.ts index 02553dbb3c1..3f3f4b95234 100644 --- a/src/client.ts +++ b/src/client.ts @@ -5196,6 +5196,10 @@ export class MatrixClient extends TypedEventEmitter