From cbe0a7708ee65b86c3a58013408837f487d942b0 Mon Sep 17 00:00:00 2001 From: Nikita Sivukhin Date: Fri, 8 Aug 2025 01:21:37 +0400 Subject: [PATCH] update tests --- testing/javascript/__test__/async.test.js | 6 +++--- testing/javascript/__test__/sync.test.js | 6 +++--- testing/javascript/package-lock.json | 8 +++++--- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/testing/javascript/__test__/async.test.js b/testing/javascript/__test__/async.test.js index cbc2bce06..93b24f8ef 100644 --- a/testing/javascript/__test__/async.test.js +++ b/testing/javascript/__test__/async.test.js @@ -437,9 +437,9 @@ const connect = async (path, options = {}) => { } const provider = process.env.PROVIDER; if (provider === "turso") { - const x = await import("@tursodatabase/turso"); - const db = new x.default(path, options); - return [db, path, x.SqliteError]; + const { Database, SqliteError } = await import("@tursodatabase/turso"); + const db = new Database(path, options); + return [db, path, SqliteError]; } if (provider === "libsql") { const x = await import("libsql/promise"); diff --git a/testing/javascript/__test__/sync.test.js b/testing/javascript/__test__/sync.test.js index 0f0abd49a..144af4e57 100644 --- a/testing/javascript/__test__/sync.test.js +++ b/testing/javascript/__test__/sync.test.js @@ -465,9 +465,9 @@ const connect = async (path, options = {}) => { } const provider = process.env.PROVIDER; if (provider === "turso") { - const x = await import("@tursodatabase/turso/sync"); - const db = new x.default(path, options); - return [db, path, provider, x.SqliteError]; + const { Database, SqliteError }= await import("@tursodatabase/turso/sync"); + const db = new Database(path, options); + return [db, path, provider, SqliteError]; } if (provider === "libsql") { const x = await import("libsql"); diff --git a/testing/javascript/package-lock.json b/testing/javascript/package-lock.json index 0a2c51688..a9199f0fc 100644 --- a/testing/javascript/package-lock.json +++ b/testing/javascript/package-lock.json @@ -17,13 +17,15 @@ }, "../../bindings/javascript": { "name": "@tursodatabase/turso", - "version": "0.1.3", + "version": "0.1.4-pre.2", "license": "MIT", "devDependencies": { "@napi-rs/cli": "^3.0.4", "@napi-rs/wasm-runtime": "^1.0.1", "ava": "^6.0.1", - "better-sqlite3": "^11.9.1" + "better-sqlite3": "^11.9.1", + "tsc": "^2.0.4", + "typescript": "^5.9.2" }, "engines": { "node": ">= 10" @@ -31,7 +33,7 @@ }, "../../packages/turso-serverless": { "name": "@tursodatabase/serverless", - "version": "0.1.1", + "version": "0.1.2", "license": "MIT", "devDependencies": { "@types/node": "^24.0.13",