From 64f657e5a214b3c4e9248810a42ff35f3ad3f6aa Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Wed, 23 Sep 2020 18:20:29 +0200 Subject: [PATCH] fix test --- src/matrix/room/RoomSummary.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/matrix/room/RoomSummary.js b/src/matrix/room/RoomSummary.js index 392bf755..72769f34 100644 --- a/src/matrix/room/RoomSummary.js +++ b/src/matrix/room/RoomSummary.js @@ -291,10 +291,12 @@ export class RoomSummary { export function tests() { return { - "membership trigger change": function(assert) { + "membership trigger change": async function(assert) { const summary = new RoomSummary("id"); let written = false; - const changes = summary.writeSync({}, "join", false, false, {roomSummary: {set: () => { written = true; }}}); + let changes = summary.data.applySyncResponse({}, "join"); + const txn = {roomSummary: {set: () => { written = true; }}}; + changes = summary.writeData(changes, txn); assert(changes); assert(written); assert.equal(changes.membership, "join");