mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-08-04 10:08:20 +00:00
limbo: test simple version of pragma table_list()
This commit is contained in:
parent
acf4bdf835
commit
9f45013ec7
1 changed files with 10 additions and 0 deletions
|
@ -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];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue