dockest logo

dockest

erikengervall/dockest

Docker + Jest integration testing for Node.js

GraphCanon updated 3w · GitHub synced 3w

110 stars17 forksLast push 6mo TypeScript MIT

Decision brief

Dockest integrates Docker and Jest for setting up and tearing down containers during Node.js application testing.

Good fit when

  • You are using Jest v20.0.0 or higher in your project and want to perform integration tests involving Dockerized services, such as Redis or PostgreSQL.
  • Your Node.js application integrates with one or more microservices that you need to mock or emulate during testing, facilitating a smooth testing experience within the isolation of Docker containers.

Avoid when

  • You are using Jest versions prior to v20.0.0 as Dockest is incompatible with older releases.
  • Your project does not require microservices setup for testing and solely relies on unit tests without environmental dependencies provided by Docker services.

Observed Jul 17, 2026 · Source: enrich:decision_facts

Verify the decision

Maintenance and security

Full trust report
Maintenance
Slowing (165d since push)
As of 3w
Provenance
Not a fork · Personal account
As of 3w
Security (OSV)
Not scanned
As of 3w

Public GitHub metadata and optional OSV scans. Signals, not a guarantee. Trust methodology.

Install

npm install dockest
npm

Similar tools

Same-category neighbours. No typed graph edges are catalogued for this tool yet.

Evidence and technical details

Sourced facts, taxonomy, compatibility claims, README excerpt, and machine-readable endpoints.

Overview

Dockest is a library that integrates Docker and Jest for setting up and tearing down containers during the testing of Node.js applications.

Capability facts

MCP server
No MCP server detected

Source: repo_scan · Aug 1, 2026

Languages
typescript, javascript

Source: github.language+package.json · Aug 1, 2026

Categories

Tags

README

System requirements

In order to run Dockest, there's a few system requirements:

  • Dockest uses Jest's programmatic CLI and requires Jest v20.0.0 or newer to work
  • Docker
  • Docker Compose ("On desktop systems like Docker Desktop for Mac and Windows, Docker Compose is included as part of those desktop installs.")

Install

yarn add --dev dockest

---

# docker-compose.yml
version: '3.8'

services:
  myRedis:
    image: redis:5.0.3-alpine
    ports:
      - published: 6379
        target: 6379
// dockest.ts
import { Dockest } from 'dockest';

const dockest = new Dockest();

// Specify the services from the Compose file that should be included in the integration test
const dockestServices = [
  {
    serviceName: 'myRedis', // Must match a service in the Compose file
  },
];

dockest.run(dockestServices);

docker-compose.yml

version: '3.8'

services: postgres: # (1) image: postgres:9.6-alpine ports: - published: 5432 target: 5432 environment: # (2) POSTGRES_DB: baby POSTGRES_USER: dont POSTGRES_PASSWORD: hurtme


```ts
// dockest.ts
import { Dockest } from 'dockest';

const { run } = new Dockest();

run([
  {
    serviceName: 'postgres', // must match (1)
    readinessCheck: async ({
      defaultReadinessChecks: { postgres },
      dockerComposeFileService: {
        environment: { POSTGRES_DB, POSTGRES_USER }, // must match (2)
      },
    }) => postgres({ POSTGRES_DB, POSTGRES_USER }),
  },
]);

defaultReadinessChecks.redis

The default readiness check for Redis is based on this image which is plug-and-play.


---

# docker-compose.yml
version: '3.8'

services:
  redis: # (1)
    image: redis:5.0.3-alpine
    ports:
      - published: 6379
        target: 6379
// dockest.ts
import { Dockest } from 'dockest';

const { run } = new Dockest();

run([
  {
    serviceName: 'redis', // must match (1)
    readinessCheck: ({ defaultReadinessChecks: { redis } }) => redis(),
  },
]);

defaultReadinessChecks.web [WIP]

Requires wget. The image would most likely be a self-built web service.

The exact use case should be fleshed out.

// dockest.ts
import { Dockest } from 'dockest';

const { run } = new Dockest();

run([
  {
    serviceName: 'web', // must match (1)
    readinessCheck: async ({ defaultReadinessChecks: { web } }) => web(),
  },
]);

For agents

This page has a .md twin and JSON over the API.

Was this helpful?

Anonymous feedback helps us improve pages and translations.