mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 04:27:21 +00:00
17 lines
549 B
TypeScript
17 lines
549 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { SQLocalConnection, type SQLocalConnectionConfig } from "../src";
|
|
|
|
describe(SQLocalConnection, () => {
|
|
function create(config: SQLocalConnectionConfig = {}) {
|
|
return new SQLocalConnection(config);
|
|
}
|
|
|
|
it("constructs", async () => {
|
|
const connection = create();
|
|
expect(() => connection.client).toThrow();
|
|
await connection.init();
|
|
expect(connection.client).toBeDefined();
|
|
expect(await connection.client.sql`SELECT 1`).toEqual([{ "1": 1 }]);
|
|
});
|
|
});
|