chore(tests): add Chat model tests (#784)

* add search and status tests

* reset to previous status in test

* move version to its own test

* add tests for Chat model

* keep hooks at the top

* run tests recursively in default script
This commit is contained in:
Pedro S. Lopez 2022-02-05 22:05:42 -04:00 • committed by GitHub
commit f149516d0d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 246 additions and 4 deletions

View file

@ -729,7 +729,7 @@ class Client extends EventEmitter {
return await this.pupPage.evaluate(async chatId => {
let chat = await window.Store.Chat.get(chatId);
await window.Store.Cmd.archiveChat(chat, true);
return chat.archive;
return true;
}, chatId);
}
@ -741,7 +741,7 @@ class Client extends EventEmitter {
return await this.pupPage.evaluate(async chatId => {
let chat = await window.Store.Chat.get(chatId);
await window.Store.Cmd.archiveChat(chat, false);
return chat.archive;
return false;
}, chatId);
}

View file

@ -65,7 +65,7 @@ class Chat extends Base {
/**
* Indicates if the chat is muted or not
* @type {number}
* @type {boolean}
*/
this.isMuted = data.isMuted;