mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-17 04:46:05 +00:00
move postgres to a separate package
This commit is contained in:
19
packages/postgres/test/base.test.ts
Normal file
19
packages/postgres/test/base.test.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { describe, it, expect } from "bun:test";
|
||||
|
||||
import { PostgresConnection } from "../src";
|
||||
import { createConnection, cleanDatabase } from "./setup";
|
||||
|
||||
describe(PostgresConnection, () => {
|
||||
it("should connect to the database", async () => {
|
||||
const connection = createConnection();
|
||||
expect(await connection.ping()).toBe(true);
|
||||
});
|
||||
|
||||
it("should clean the database", async () => {
|
||||
const connection = createConnection();
|
||||
await cleanDatabase(connection);
|
||||
|
||||
const tables = await connection.getIntrospector().getTables();
|
||||
expect(tables).toEqual([]);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user