UNPKG

supabase-test

Version:

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

29 lines (28 loc) 587 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.sqlfile = sqlfile; exports.fn = fn; exports.compose = compose; function sqlfile(files) { return { seed(ctx) { for (const file of files) { ctx.admin.loadSql(file, ctx.config.database); } } }; } function fn(fn) { return { seed: fn }; } function compose(adapters) { return { async seed(ctx) { for (const adapter of adapters) { await adapter.seed(ctx); } } }; }