storage - add a test to assert that invalid path does not hang (#152441)

This commit is contained in:
Benjamin Pasero
2022-06-17 11:57:27 +02:00
committed by GitHub
parent 0662ad271a
commit ff7bf7a875
@@ -773,4 +773,18 @@ flakySuite('SQLite Storage Library', function () {
await storage.close();
});
test('invalid path does not hang', async () => {
const storage = new SQLiteStorageDatabase(join(testdir, 'nonexist', 'storage.db'));
let error;
try {
await storage.getItems();
await storage.close();
} catch (e) {
error = e;
}
ok(error);
});
});