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
24 lines (23 loc) • 460 B
JavaScript
export function sqlfile(files) {
return {
seed(ctx) {
for (const file of files) {
ctx.admin.loadSql(file, ctx.config.database);
}
}
};
}
export function fn(fn) {
return {
seed: fn
};
}
export function compose(adapters) {
return {
async seed(ctx) {
for (const adapter of adapters) {
await adapter.seed(ctx);
}
}
};
}