@n1ru4l/dockest

Dockest is an integration testing tool aimed at alleviating the process of evaluating unit tests whilst running multi-container Docker applications.

Usage no npm install needed!

<script type="module">
  import n1ru4lDockest from 'https://cdn.skypack.dev/@n1ru4l/dockest';
</script>

README

Dockest

Dockest is an integration testing tool aimed at alleviating the process of evaluating unit tests whilst running multi-container Docker applications.

dockest logo



licence npm downloads licence snyk

Why Dockest

The value that Dockest provides over e.g. plain docker-compose is that it figures out the connectivity and responsiveness status of each individual service (either synchronously or asynchronously) and once all services are ready the tests run.

Example

yarn add dockest --dev
# docker-compose.yml

version: '3.8'

services:
  myRedis:
    image: redis:5.0.3-alpine
    ports:
      - published: 6379
        target: 6379
// dockest.ts

import { Dockest, logLevel } from 'dockest'

const dockest = new Dockest()

const dockestServices = [
  {
    serviceName: 'myRedis', // Match with configuration in docker-compose.yml
  },
]

dockest.run(dockestServices)

Documentation

Learn more about Dockest on the official website.

Contributing

If you'd like to contribute, start by searching through the issues and pull requests to see whether someone else has raised a similar idea or question.

If you don't see your idea listed, and you think it fits into the goals of this guide, do one of the following:

  • If your contribution is minor, such as a typo fix, open a pull request.
  • If your contribution is major, such as a new feature, start by opening an issue first. That way, other people can weigh in on the discussion before you do any work.

Acknowledgements

Thanks to Juan Lulkin for the logo ❤️

Thanks to Laurin Quast for great ideas and contributions 💙

License

MIT