Close to prevent hangs

This commit is contained in:
toasted-nutbread 2020-02-19 19:59:24 -05:00
parent 7901a46721
commit a8b1e40a1e
2 changed files with 8 additions and 0 deletions

View File

@ -96,6 +96,12 @@ class Database {
}
}
async close() {
this.validate();
this.db.close();
this.db = null;
}
async purge() {
this.validate();

View File

@ -130,6 +130,8 @@ async function testDatabase1() {
// Cleanup
await cleanup();
}
await database.close();
}
async function testDatabaseEmpty1(database) {