mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-17 08:34:19 +01:00
testing/javascript: Fix libSQL connection setup
The API changed in libSQL to be async.
This commit is contained in:
@@ -489,9 +489,9 @@ const connect = async (path, options = {}) => {
|
||||
return [db, path, SqliteError];
|
||||
}
|
||||
if (provider === "libsql") {
|
||||
const x = await import("libsql/promise");
|
||||
const db = new x.default(path, options);
|
||||
return [db, path, x.SqliteError, path];
|
||||
const libsql = await import("libsql/promise");
|
||||
const db = await libsql.connect(path, options);
|
||||
return [db, path, libsql.SqliteError, path];
|
||||
}
|
||||
if (provider === "serverless") {
|
||||
const x = await import("@tursodatabase/serverless");
|
||||
|
||||
Reference in New Issue
Block a user