Home

Awesome

Running karma unit tests in Google Chrome inside Docker

This is a code example project for a Medium story about Docker/Karma/Chrome:

Running Karma tests with Headless Chrome inside Docker

The example code runs karma tests, and also has a "mock" bundle step, which just creates a result.txt file. In a real project, this build step would probably be the result of a gulp/webpack etc. command.

Running outside Docker

This assumes that you have node.js/npm/yarn installed.

Running inside Docker

This assumes that you have Docker and Docker Compose installed.

Running on CI

License for the sample source code

Modified Beerware license: You can do whatever you want with this stuff. If we meet some day, and you think this stuff is worth it, you can buy me a beer in return. No attribution is necessary.

(To make 100 % sure you can use legally use this for whatever you want, it is also licensed as Unlicensed, MIT and/or WTFPL.)