mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
fix test
This commit is contained in:
parent
6e77ebb160
commit
64f657e5a2
@ -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");
|
||||||
|
Loading…
Reference in New Issue
Block a user