mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-06 17:54:20 +01:00
limbo: test simple version of pragma table_list()
This commit is contained in:
@@ -207,6 +207,8 @@ test("Test exec(): Should correctly load multiple statements from file", async (
|
||||
t.truthy(row.name);
|
||||
t.true(typeof row.age === "number");
|
||||
}
|
||||
});
|
||||
|
||||
test("pragma query", async (t) => {
|
||||
const [db] = await connect(":memory:");
|
||||
let page_size = db.pragma("page_size");
|
||||
@@ -241,6 +243,14 @@ test("Test Statement.source", async t => {
|
||||
t.is(stmt.source, sql);
|
||||
});
|
||||
|
||||
test("simple pragma table_list", async (t) => {
|
||||
const [db] = await connect(":memory:");
|
||||
let param = "sqlite_schema";
|
||||
let actual = db.pragma(`table_info(${param})`, {simple: true});
|
||||
let expectedValue = 0;
|
||||
t.deepEqual(actual, expectedValue);
|
||||
});
|
||||
|
||||
const connect = async (path) => {
|
||||
const db = new Database(path);
|
||||
return [db];
|
||||
|
||||
Reference in New Issue
Block a user