Skip to content

Demo repo of watching test file from a mounted directory.

License

Notifications You must be signed in to change notification settings

KennethTrecy/docker_mocha

Repository files navigation

Demo 20221222

This is a demonstration on how to make a testing framework watch files in a container. The testing framework used in this demo is Mocha.

Upon looking in the dependencies of Mocha, it uses Chokidar package and requires CHOKIDAR_USEPOLLING to watch the files. This problem was also faced in other packages.

Instructions

Pre-requisites

Steps

  1. Open Docker desktop application or at least start it is able to run a container.
  2. While waiting for the desktop application, run npm install in case you want run the tests locally first.
  3. When Docker is ready to run a container, run docker compose up -d.
  4. Check the desktop application to confirm that the container is running and view its output.
  5. Try to change the results in sample test.
  6. You should see that the test will re-run in the container.

Origin

Some parts of the repository was based from empty_package_json branch of Web Template.

Author

Coded by Kenneth Trecy Tobias.

About

Demo repo of watching test file from a mounted directory.

Topics

Resources

License

Stars

Watchers

Forks