Skip to content

Commit

Permalink
add more testing
Browse files Browse the repository at this point in the history
  • Loading branch information
nplasterer committed Jun 7, 2024
1 parent 81318a5 commit 297a27d
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions example/src/tests/groupTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,16 @@ test('can stream groups', async () => {
throw Error('Expected group length 3 but it is: ' + groups.length)
}

// bo creates a group with caro and then adds alix so a stream callback is fired
const boCaroGroup = await boClient.conversations.newGroup([
caroClient.address,
])
await boCaroGroup.addMembers([alixClient.address])
await delayToPropogate()
if ((groups.length as number) !== 4) {
throw Error('Unexpected num groups (should be 4): ' + groups.length)
}

cancelStreamGroups()
await delayToPropogate()

Expand All @@ -727,8 +737,8 @@ test('can stream groups', async () => {
alixClient.address,
])
await delayToPropogate()
if ((groups.length as number) !== 3) {
throw Error('Unexpected num groups (should be 3): ' + groups.length)
if ((groups.length as number) !== 4) {
throw Error('Unexpected num groups (should be 4): ' + groups.length)
}

return true
Expand Down

0 comments on commit 297a27d

Please sign in to comment.