fix test
This commit is contained in:
parent
6e77ebb160
commit
64f657e5a2
1 changed files with 4 additions and 2 deletions
|
@ -291,10 +291,12 @@ export class RoomSummary {
|
||||||
|
|
||||||
export function tests() {
|
export function tests() {
|
||||||
return {
|
return {
|
||||||
"membership trigger change": function(assert) {
|
"membership trigger change": async function(assert) {
|
||||||
const summary = new RoomSummary("id");
|
const summary = new RoomSummary("id");
|
||||||
let written = false;
|
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(changes);
|
||||||
assert(written);
|
assert(written);
|
||||||
assert.equal(changes.membership, "join");
|
assert.equal(changes.membership, "join");
|
||||||
|
|
Reference in a new issue