mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +01:00
add failing test
This commit is contained in:
parent
25d0cbe9a2
commit
d0c1ddb51b
@ -243,6 +243,17 @@ export function tests() {
|
|||||||
assert.equal(change.member.membership, "join");
|
assert.equal(change.member.membership, "join");
|
||||||
assert.equal(txn.members.get(alice).displayName, "Alice");
|
assert.equal(txn.members.get(alice).displayName, "Alice");
|
||||||
},
|
},
|
||||||
|
"new join through both timeline and state": async assert => {
|
||||||
|
const writer = new MemberWriter(roomId);
|
||||||
|
const txn = createStorage();
|
||||||
|
const aliceJoin = createMemberEvent("join", alice, "Alice");
|
||||||
|
const change = await writer.writeStateMemberEvent(aliceJoin, false, txn);
|
||||||
|
assert(!change.hasJoined);
|
||||||
|
assert(!change.hasLeft);
|
||||||
|
const timelineChange = await writer.writeTimelineMemberEvent(aliceJoin, txn);
|
||||||
|
assert(change.hasJoined);
|
||||||
|
assert(!change.hasLeft);
|
||||||
|
},
|
||||||
"newly joined member causes a change with lookup done first": async assert => {
|
"newly joined member causes a change with lookup done first": async assert => {
|
||||||
const event = createMemberEvent("join", alice, "Alice");
|
const event = createMemberEvent("join", alice, "Alice");
|
||||||
const writer = new MemberWriter(roomId);
|
const writer = new MemberWriter(roomId);
|
||||||
|
Loading…
Reference in New Issue
Block a user