Skip to content

Commit

Permalink
feat(lib): add test changes
Browse files Browse the repository at this point in the history
  • Loading branch information
piotr-suwala committed Oct 17, 2023
1 parent dd906f0 commit 026fe94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/tests/channel.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ describe("Channel test", () => {
expect(unreadCount).toBe(false)

const { messages } = await channel.getHistory()
membership = await membership.setLastReadMessage(messages[0])
membership = await membership.setLastReadMessageTimetoken(messages[0].timetoken)
unreadCount = await membership.getUnreadMessagesCount()
expect(unreadCount).toBe(1)

Expand Down Expand Up @@ -651,7 +651,7 @@ describe("Channel test", () => {
const { timetoken } = await channel.sendText("New message")
await sleep(150) // history calls have around 130ms of cache time
const message = await channel.getMessage(timetoken)
await membership.setLastReadMessage(message)
await membership.setLastReadMessageTimetoken(message.timetoken)
await sleep(150) // history calls have around 130ms of cache time

expect(mockCallback).toHaveBeenCalledTimes(2)
Expand Down

0 comments on commit 026fe94

Please sign in to comment.