Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nikeee committed Feb 27, 2024
1 parent 0a6bfee commit 0833856
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/js/bun/sqlite/sqlite.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ it("db.defineFunction()", () => {
const db = Database.open(":memory:");
db.defineFunction("catNameLength", name => name.length);

db.exec("CREATE TABLE cats (id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT UNIQUE, age INTEGER)");
db.exec("CREATE TABLE cats (id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT, age INTEGER)");
const insert = db.prepare("INSERT INTO cats (name, age) VALUES (@name, @age)");
const cats = [
{ "@name": "Joey", "@age": 2 },
Expand All @@ -503,7 +503,7 @@ it("db.defineFunction()", () => {
it("db.defineFunction() with varargs", () => {
const db = Database.open(":memory:");
db.defineFunction("joinStrings", { varargs: true }, (...args) => args.join(","));
const res = db.query("SELECT joinStrings('a','b','c') AS joined FROM cats").get().joined;
const res = db.query("SELECT joinStrings('a','b','c') AS joined").get().joined;
expect(res).toBe("a,b,c");
});

Expand Down

0 comments on commit 0833856

Please sign in to comment.