mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 12:37:20 +00:00
tests: fix node tests + add connection test suite for sqlocal
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { describe } from "bun:test";
|
||||
import { SQLocalConnection } from "./SQLocalConnection";
|
||||
import { connectionTestSuite } from "data/connection/connection-test-suite";
|
||||
import { bunTestRunner } from "adapter/bun/test";
|
||||
import { SQLocalKysely } from "sqlocal/kysely";
|
||||
|
||||
describe("SQLocalConnection", () => {
|
||||
connectionTestSuite(bunTestRunner, {
|
||||
makeConnection: () => ({
|
||||
connection: new SQLocalConnection(new SQLocalKysely({ databasePath: ":memory:" })),
|
||||
dispose: async () => {},
|
||||
}),
|
||||
rawDialectDetails: [],
|
||||
});
|
||||
});
|
||||
@@ -1,5 +1,7 @@
|
||||
import { Kysely, ParseJSONResultsPlugin } from "kysely";
|
||||
import { SqliteConnection, SqliteIntrospector, type DB } from "bknd";
|
||||
import { SqliteConnection } from "../SqliteConnection";
|
||||
import { SqliteIntrospector } from "../SqliteIntrospector";
|
||||
import type { DB } from "bknd";
|
||||
import type { SQLocalKysely } from "sqlocal/kysely";
|
||||
|
||||
const plugins = [new ParseJSONResultsPlugin()];
|
||||
|
||||
Reference in New Issue
Block a user