mongodb-memory-server Global (MongoDB 4.2)

JSON →
library 11.2.0 ·javascript
verified Jun 5, 2026

A sub-package of mongodb-memory-server that automatically downloads a MongoDB 4.2 binary for testing purposes. Version 11.2.0 is current; releases follow mongodb-memory-server core with weekly or monthly cadence. It eliminates the need to manually manage mongod binaries for CI/CD and local test environments. Unlike mongodb-memory-server-core, this package includes the binary download as a postinstall step, making setup effortless. Supports TypeScript with bundled type declarations. Requires Node >=20.19.0 and is ESM-only since v9+. Key differentiator: pre-pinned version (4.2) avoiding version drift in tests.