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

11 lines (10 loc) 266 B
import { loadCsv } from 'pgsql-seed'; export function csv(tables) { return { async seed(ctx) { for (const [table, filePath] of Object.entries(tables)) { await loadCsv(ctx.pg, table, filePath); } } }; }