Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions tests/unit/store-adapter-tier2.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
9 changes: 9 additions & 0 deletions tests/unit/store-adapter.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading