fix: fix and add tests for trash

This commit is contained in:
thecodrr
2019-12-17 17:13:02 +05:00
parent ba22c955ba
commit 1c81034d57
2 changed files with 31 additions and 2 deletions

View File

@@ -374,9 +374,14 @@ class Database {
}
getTrash() {
checkInitialized();
checkInitialized.call(this);
return extractValues(this.trash).reverse();
}
async clearTrash() {
this[KEYS.trash] = {};
await this.storage.write(KEYS.trash, this[KEYS.trash]);
}
}
export default Database;