testing/javascript: Add pragma() after close() test case

This commit is contained in:
Pekka Enberg
2025-08-06 09:10:03 +03:00
parent 2a36d133e3
commit 53ac67a2be

View File

@@ -341,6 +341,17 @@ test.serial("Database.prepare() after close()", async (t) => {
});
});
test.serial("Database.pragma() after close()", async (t) => {
const db = t.context.db;
await db.close();
await t.throwsAsync(async () => {
await db.pragma("cache_size = 2000");
}, {
instanceOf: TypeError,
message: "The database connection is not open"
});
});
test.serial("Database.exec() after close()", async (t) => {
const db = t.context.db;
await db.close();