pglite-test
Postgres Tests Without a Server
A drop-in pgsql-test backed by an in-process PGlite instance. Instant, isolated Postgres databases with per-test rollbacks and pgpm-native seeding — no server, no Docker, no CI service container.
Pure WASM — no Postgres server, no Docker, no service container
Same getConnections() API; your tests read exactly the same
Every test runs in its own transaction or savepoint
Run your whole Postgres test suite in-process
One isolated instance per suite on ElectricSQL's WASM build of Postgres — no createdb, no psql, no TCP.
The standard two-client beforeEach/afterEach harness emits exactly one BEGIN/SAVEPOINT/ROLLBACK per test on the shared session.
Role-based auth via setContext() with full GUC support; the standard app roles are bootstrapped for you by default.
seed.pgpm() deploys your real database modules into PGlite with the unmodified pgpm engine.
Register pgvector, pg_trgm and friends at construction, then CREATE EXTENSION as usual.
In-memory by default: no residue, no reboots, just clean exits — ideal for GitHub Actions.
The getConnections() API mirrors pgsql-test, so existing suites port by changing the import. Each suite gets its own in-process PGlite instance with automatic rollbacks.
Register WASM extensions like pgvector at construction, keep data in memory or on disk, and seed with the unmodified pgpm engine.
The standard app roles are created for you by default. Opt out for a clean superuser-only instance and define your own roles with real Postgres DDL.