Skip to content

Commit 6dc4a62

Browse files
authored
Merge pull request #3367 from matrix-org/matthew/fix-accumulated-sync-summaries
fix accumulated sync summaries - andy review
2 parents d459a91 + 1cd8ea6 commit 6dc4a62

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

spec/unit/sync-accumulator.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,8 @@ describe("SyncAccumulator", function () {
545545
expect(summary["m.heroes"]).toEqual(["@bob:bar"]);
546546
});
547547

548-
it("should reset summary properties", function () {
548+
it("should correctly update summary properties to zero", function () {
549+
// When we receive updates of a summary property, the last of which is 0
549550
sa.accumulate(
550551
createSyncResponseWithSummary({
551552
"m.heroes": ["@alice:bar"],
@@ -559,6 +560,7 @@ describe("SyncAccumulator", function () {
559560
}),
560561
);
561562
const summary = sa.getJSON().roomsData.join["!foo:bar"].summary;
563+
// Then we give an answer of 0
562564
expect(summary["m.invited_member_count"]).toEqual(0);
563565
});
564566

0 commit comments

Comments
 (0)