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
14 lines (13 loc) • 477 B
JavaScript
import { getEnvOptions } from '@launchql/types';
import { LaunchQLProject, deploy } from '@launchql/core';
export function sqitch(cwd) {
return {
async seed(ctx) {
const proj = new LaunchQLProject(cwd ?? ctx.connect.cwd);
if (!proj.isInModule())
return;
const opts = getEnvOptions({ pg: ctx.config });
await deploy(opts, proj.getModuleName(), ctx.config.database, proj.modulePath);
}
};
}