UNPKG

pgsql-test

Version:

pgsql-test offers isolated, role-aware, and rollback-friendly PostgreSQL environments for integration tests — giving developers realistic test coverage without external state pollution

21 lines (20 loc) 637 B
import { Pool } from 'pg'; import { PgConfig } from '@launchql/types'; import { PgTestClient } from './test-client'; export declare class PgTestConnector { private static instance; private readonly clients; private readonly pgPools; private readonly seenDbConfigs; private verbose; private constructor(); static getInstance(verbose?: boolean): PgTestConnector; private poolKey; private dbKey; getPool(config: PgConfig): Pool; getClient(config: PgConfig): PgTestClient; closeAll(): Promise<void>; close(): void; drop(config: PgConfig): void; kill(client: PgTestClient): void; }