This commit is contained in:
Adhiraj
2020-09-04 13:49:26 +05:30
parent 1340279cdb
commit fb51a3f2cd
3 changed files with 19 additions and 16 deletions

View File

@@ -36,8 +36,8 @@ export const WAConnectionTest = (name: string, func: (conn: WAConnection) => voi
)
export const assertChatDBIntegrity = (conn: WAConnection) => {
conn.chats.all ().forEach (chat => (
assert.equal (
chat.messages.sort ((m1, m2) => toNumber(m1.messageTimestamp)-toNumber(m2.messageTimestamp)),
assert.deepEqual (
[...chat.messages].sort ((m1, m2) => toNumber(m1.messageTimestamp)-toNumber(m2.messageTimestamp)),
chat.messages
)
))