diff --git a/tests/unit/store-adapter-tier2.test.mjs b/tests/unit/store-adapter-tier2.test.mjs index d2d749bb..6aba7ca6 100644 --- a/tests/unit/store-adapter-tier2.test.mjs +++ b/tests/unit/store-adapter-tier2.test.mjs @@ -39,6 +39,15 @@ async function createSqliteStore(t) { t.skip("better-sqlite3 unavailable in this environment"); return null; } + // native binding 검증 — import 성공해도 native fn 호출 시 fail 가능 (예: Node v26 + 12.6.2) + try { + const probe = new sqliteCtor(":memory:"); + probe.prepare("SELECT 1").get(); + probe.close(); + } catch { + t.skip("better-sqlite3 native binding unavailable in this environment"); + return null; + } return createStoreAdapter(tempDbPath(), { loadDatabase: async () => sqliteCtor, diff --git a/tests/unit/store-adapter.test.mjs b/tests/unit/store-adapter.test.mjs index 4b0a85d5..ae9787fe 100644 --- a/tests/unit/store-adapter.test.mjs +++ b/tests/unit/store-adapter.test.mjs @@ -67,6 +67,15 @@ describe("hub/store-adapter.mjs", () => { t.skip("better-sqlite3 unavailable in this environment"); return; } + // native binding 검증 — import 성공해도 native fn 호출 시 fail 가능 (예: Node v26 + 12.6.2) + try { + const probe = new sqliteCtor(":memory:"); + probe.prepare("SELECT 1").get(); + probe.close(); + } catch { + t.skip("better-sqlite3 native binding unavailable in this environment"); + return; + } const store = await createStoreAdapter(dbPath, { loadDatabase: async () => sqliteCtor,