Postgres Testing Toolkit

Test against a real PostgreSQL database with seeded fixtures, per-test rollback, and role or JWT context for row-level security. Includes adapters for Supabase and Drizzle.

Part of Postgres AST Toolkit

Packages and tools

  • pgsql-test

    Run TypeScript integration tests against an isolated PostgreSQL database seeded with fixtures. Roll changes back after each test and set role or JWT context to exercise row-level security.

  • supabase-test

    Run PostgreSQL integration tests with Supabase database and auth defaults. Built on pgsql-test, it lets tests seed fixtures, switch roles to check row-level security, and roll writes back after each test.

  • drizzle-orm-test

    Run Drizzle ORM integration tests with role-aware PostgreSQL connections and per-test rollback.

  • pgsql-seed

    Seed PostgreSQL fixtures from CSV, JSON, and SQL in tests and development.