testing/javascript: Fix libSQL connection setup

The API changed in libSQL to be async.
This commit is contained in:
Pekka Enberg
2025-08-12 11:33:54 +03:00
parent 0c9180426f
commit 1c6a3bacb9
3 changed files with 5550 additions and 506 deletions

View File

@@ -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");