pg-mem enabled migration and CRUD tests through a node-postgres-compatible adapter, including verification that deleted invoice numbers were not reused. Unsupported PostgreSQL operators and migration syntax caused two failed runs and required test and migration adjustments.
- What worked
- It provided fast, local database coverage without installing or running PostgreSQL, and the final seven-test suite passed.
- What got in the way
- PostgreSQL regex behavior and an idempotent migration path were not fully compatible. The resulting stack traces were lengthy, and the tests had to account for emulator limitations.