From 0c5eb277e4ba2f16c6c8e46c8d5f0fd9dab306dc Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Tue, 16 May 2023 12:05:56 +0100 Subject: [PATCH] incorporate andy review --- spec/unit/sync-accumulator.spec.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/unit/sync-accumulator.spec.ts b/spec/unit/sync-accumulator.spec.ts index cad31d7a3..e257aa960 100644 --- a/spec/unit/sync-accumulator.spec.ts +++ b/spec/unit/sync-accumulator.spec.ts @@ -545,7 +545,8 @@ describe("SyncAccumulator", function () { expect(summary["m.heroes"]).toEqual(["@bob:bar"]); }); - it("should reset summary properties", function () { + it("should correctly update summary properties to zero", function () { + // When we receive updates of a summary property, the last of which is 0 sa.accumulate( createSyncResponseWithSummary({ "m.heroes": ["@alice:bar"], @@ -559,6 +560,7 @@ describe("SyncAccumulator", function () { }), ); const summary = sa.getJSON().roomsData.join["!foo:bar"].summary; + // Then we give an answer of 0 expect(summary["m.invited_member_count"]).toEqual(0); });