Mocha test helper that automatically manages a Docker-based PostgreSQL container for integration tests. Version 1.0.1 is the latest stable release. It patches Mocha's Context prototype to provide `this.dockerPostgres()` and `this.conString`. The container is reused across tests (only started once per run), and each call creates a fresh database, enabling fast, isolated test databases without manual setup or teardown. Lighter than full testcontainers solutions; designed specifically for Mocha.
npm install mocha-docker-postgresNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Sets up a Docker PostgreSQL container before tests, provides connection string, and uses it to instantiate a module.
Ensure Docker is installed and running before executing tests.
Use a separate test file or conditional requires to isolate Docker-dependent tests.
Use `function()` keyword for hooks (before, beforeEach, etc.)
Run `npm install --save-dev dockerode`
Use `function()` keyword for before/beforeEach hooks; ensure require('mocha-docker-postgres') is called first.