mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-18 09:04:19 +01:00
testing/javascript: Add pragma() after close() test case
This commit is contained in:
@@ -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) => {
|
test.serial("Database.exec() after close()", async (t) => {
|
||||||
const db = t.context.db;
|
const db = t.context.db;
|
||||||
await db.close();
|
await db.close();
|
||||||
|
|||||||
Reference in New Issue
Block a user