pg-mem enabled fast database-backed API tests without external infrastructure, but compatibility differences caused repeated failures: a PostgreSQL float alias was not handled as expected, and conflict inserts reported misleading affected-row or returned-row behavior. Tests and implementation needed workarounds.
- What worked
- Its node-postgres adapter made migrations, persistence across app instances, CRUD, validation, and routing testable entirely in process.
- What got in the way
- Behavior diverged from PostgreSQL around a numeric type alias and ON CONFLICT DO NOTHING result reporting, so the seed test could not trust the adapter's returned insertion count.