{"data":{"slug":"erikengervall-dockest","name":"dockest","tagline":"Docker + Jest integration testing for Node.js","github_url":"https://github.com/erikengervall/dockest","owner":"erikengervall","repo":"dockest","owner_avatar_url":"https://avatars.githubusercontent.com/u/5392475?v=4","primary_language":"TypeScript","stars":110,"forks":17,"topics":["docker","docker-compose","hacktoberfest","integration-testing","jest","nodejs","testing","typescript"],"archived":false,"github_pushed_at":"2026-02-16T07:40:12+00:00","maintenance_label":"Slowing","stars_delta_30d":0,"url":"https://www.graphcanon.com/tools/erikengervall-dockest","markdown_url":"https://www.graphcanon.com/tools/erikengervall-dockest.md","api_url":"https://www.graphcanon.com/api/graphcanon/tools/erikengervall-dockest","graph_url":"https://www.graphcanon.com/api/graphcanon/graph?tool=erikengervall-dockest","description":"Docker + Jest integration testing for Node.js","homepage_url":"https://npmjs.com/package/dockest","license":"MIT","open_issues":50,"watchers":2,"ai_summary":"Dockest is a library that integrates Docker and Jest for setting up and tearing down containers during the testing of Node.js applications.","readme_excerpt":"## System requirements\n\nIn order to run Dockest, there's a few system requirements:\n\n- Dockest uses Jest's programmatic CLI and requires Jest **v20.0.0** or newer to work\n- [Docker](https://www.docker.com/)\n- [Docker Compose](https://docs.docker.com/compose/install/) (_\"On desktop systems like Docker Desktop for Mac and\n  Windows, Docker Compose is included as part of those desktop installs.\"_)\n\n---\n\n## Install\n\n```bash\nyarn add --dev dockest\n\n---\n\n# docker-compose.yml\nversion: '3.8'\n\nservices:\n  myRedis:\n    image: redis:5.0.3-alpine\n    ports:\n      - published: 6379\n        target: 6379\n```\n\n```ts\n// dockest.ts\nimport { Dockest } from 'dockest';\n\nconst dockest = new Dockest();\n\n// Specify the services from the Compose file that should be included in the integration test\nconst dockestServices = [\n  {\n    serviceName: 'myRedis', // Must match a service in the Compose file\n  },\n];\n\ndockest.run(dockestServices);\n```\n\n---\n\n# docker-compose.yml\nversion: '3.8'\n\nservices:\n  postgres: # (1)\n    image: postgres:9.6-alpine\n    ports:\n      - published: 5432\n        target: 5432\n    environment: # (2)\n      POSTGRES_DB: baby\n      POSTGRES_USER: dont\n      POSTGRES_PASSWORD: hurtme\n```\n\n```ts\n// dockest.ts\nimport { Dockest } from 'dockest';\n\nconst { run } = new Dockest();\n\nrun([\n  {\n    serviceName: 'postgres', // must match (1)\n    readinessCheck: async ({\n      defaultReadinessChecks: { postgres },\n      dockerComposeFileService: {\n        environment: { POSTGRES_DB, POSTGRES_USER }, // must match (2)\n      },\n    }) => postgres({ POSTGRES_DB, POSTGRES_USER }),\n  },\n]);\n```\n\n#### `defaultReadinessChecks.redis`\n\nThe default readiness check for Redis is based on this [image](https://hub.docker.com/_/postgres) which is\nplug-and-play.\n\n```yaml\n\n---\n\n# docker-compose.yml\nversion: '3.8'\n\nservices:\n  redis: # (1)\n    image: redis:5.0.3-alpine\n    ports:\n      - published: 6379\n        target: 6379\n```\n\n```ts\n// dockest.ts\nimport { Dockest } from 'dockest';\n\nconst { run } = new Dockest();\n\nrun([\n  {\n    serviceName: 'redis', // must match (1)\n    readinessCheck: ({ defaultReadinessChecks: { redis } }) => redis(),\n  },\n]);\n```\n\n#### `defaultReadinessChecks.web` [WIP]\n\nRequires [wget](https://www.gnu.org/software/wget/). The image would most likely be a self-built web service.\n\nThe exact use case should be fleshed out.\n\n```ts\n// dockest.ts\nimport { Dockest } from 'dockest';\n\nconst { run } = new Dockest();\n\nrun([\n  {\n    serviceName: 'web', // must match (1)\n    readinessCheck: async ({ defaultReadinessChecks: { web } }) => web(),\n  },\n]);\n```","github_created_at":"2018-12-23T19:15:00+00:00","created_at":"2026-07-11T13:33:50.146073+00:00","updated_at":"2026-09-25T06:00:51.122472+00:00","categories":[{"slug":"developer-tools","name":"Developer Tools","url":"https://www.graphcanon.com/categories/developer-tools","markdown_url":"https://www.graphcanon.com/categories/developer-tools.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/developer-tools"}],"tags":[{"slug":"docker","name":"docker"},{"slug":"hacktoberfest","name":"hacktoberfest"},{"slug":"integration-testing","name":"integration-testing"},{"slug":"jest","name":"jest"},{"slug":"nodejs","name":"nodejs"},{"slug":"testing","name":"testing"},{"slug":"typescript","name":"typescript"}],"trust":{"provenance":{"is_fork":false,"github_id":162917577,"owner_type":"User","methodology":"github_public_v1","parent_repo":null,"near_duplicate_slugs":[]},"computed_at":"2026-09-25T06:00:50.128Z","maintenance":{"label":"Slowing","score":36,"methodology":"github_public_v1","releases_90d":0,"days_since_push":220,"last_release_at":"2023-10-23T13:23:16Z","stars_delta_30d":0,"open_issues_delta_30d":0},"security_summary":{"status":"not_scanned","scanner":null,"low_count":0,"high_count":0,"last_scan_at":null,"medium_count":0,"scan_profile":"none","critical_count":0}},"capability_facts":{"mcp":{"source":"repo_scan","observed_at":"2026-09-25T06:00:50.590Z","server_manifest":false},"scan":{"source":"repo_scan","observed_at":"2026-09-25T06:00:50.590Z"},"languages":{"value":["typescript","javascript"],"source":"github.language+package.json","observed_at":"2026-09-25T06:00:50.590Z"},"license_spdx":{"value":"MIT","source":"github.license","observed_at":"2026-09-25T06:00:50.590Z"}},"decision_facts":{"hosting":null,"pricing":null,"requirements":null,"constraints":null,"when_to_use":["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."],"when_not_to_use":["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."],"source":"enrich:decision_facts","observed_at":"2026-07-17T02:16:28.230Z"},"constraint_facets":null,"decision_summary":[{"label":"Adopt for","value":"Dockest integrates Docker and Jest for setting up and tearing down containers during Node.js application testing."}]}}