From 53ac67a2be1c6a583eb92a0da4f94b9fa74e19ad Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Wed, 6 Aug 2025 09:10:03 +0300 Subject: [PATCH] testing/javascript: Add pragma() after close() test case --- testing/javascript/__test__/async.test.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/testing/javascript/__test__/async.test.js b/testing/javascript/__test__/async.test.js index 5fd3dd519..9c29b4860 100644 --- a/testing/javascript/__test__/async.test.js +++ b/testing/javascript/__test__/async.test.js @@ -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();