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
parent 2f1c894a34
commit f149516d0d
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;