fix test
This commit is contained in:
parent
5e8db7ed93
commit
757706425a
|
@ -47,10 +47,10 @@ describe('chatService', () => {
|
||||||
|
|
||||||
chatService.resetNewMessageCount(chat)
|
chatService.resetNewMessageCount(chat)
|
||||||
expect(chat.newMessageCount).to.eql(0)
|
expect(chat.newMessageCount).to.eql(0)
|
||||||
|
expect(chat.lastSeenMessageId).to.eql(message2.id)
|
||||||
|
|
||||||
const createdAt = new Date()
|
// Add message with higher id
|
||||||
createdAt.setSeconds(createdAt.getSeconds() + 10)
|
chatService.add(chat, { messages: [ message3 ] })
|
||||||
chatService.add(chat, { messages: [ { message3, created_at: createdAt } ] })
|
|
||||||
expect(chat.newMessageCount).to.eql(1)
|
expect(chat.newMessageCount).to.eql(1)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue