AVA test fixture providing instant, isolated Postgres databases per test using Docker containers and Postgres template databases. Version 7.3.1 runs on Node >=18, requires peer dependencies ava >=4.3.3 and testcontainers >=10.0.0. Ships TypeScript types. Key differentiator: uses shared workers and database templates for near-zero overhead test isolation, avoiding per-test container spin-up costs. Only dependency is a running Docker instance.
npm install ava-postgresNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a factory, obtains a fresh Postgres database per test, and runs a simple query.
Switch to import syntax or stay on v6 (CJS).
Upgrade ava to >=4.3.3.
Update testcontainers to match peer dependency.
Explicitly set postgresVersion to a supported version.
Use per-test database isolation (default) or provide unique databaseDedupeKey.
Use import() or switch to ava-postgres v6 for CommonJS.
Run npm install --save-dev testcontainers@^10.0.0
Use named import: import { getTestPostgresDatabaseFactory } from 'ava-postgres'Remove 'new': const factory = getTestPostgresDatabaseFactory({...})Ensure Docker is running and user is in docker group, or use Docker Desktop.