Add no-misused/floating-promises lint rule
This commit is contained in:
parent
1a68c3db62
commit
ed271d92ea
150 changed files with 1296 additions and 991 deletions
|
@ -51,21 +51,22 @@ describe('Message', () => {
|
|||
STORAGE_KEYS_TO_RESTORE.forEach(key => {
|
||||
oldStorageValues.set(key, window.textsecure.storage.get(key));
|
||||
});
|
||||
window.textsecure.storage.put('number_id', `${me}.2`);
|
||||
window.textsecure.storage.put('uuid_id', `${ourUuid}.2`);
|
||||
await window.textsecure.storage.put('number_id', `${me}.2`);
|
||||
await window.textsecure.storage.put('uuid_id', `${ourUuid}.2`);
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
await window.Signal.Data.removeAll();
|
||||
await window.storage.fetch();
|
||||
|
||||
oldStorageValues.forEach((oldValue, key) => {
|
||||
if (oldValue) {
|
||||
window.textsecure.storage.put(key, oldValue);
|
||||
} else {
|
||||
window.textsecure.storage.remove(key);
|
||||
}
|
||||
});
|
||||
await Promise.all(
|
||||
Array.from(oldStorageValues.entries()).map(([key, oldValue]) => {
|
||||
if (oldValue) {
|
||||
return window.textsecure.storage.put(key, oldValue);
|
||||
}
|
||||
return window.textsecure.storage.remove(key);
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
beforeEach(function beforeEach() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue