Don't trust random people on the internet telling you to disable the sandbox!
chromium-ci allows you to execute tests (e.g., using Karma) against a dockerized headless Chrome (Chromium) without disabling the sandbox.
docker run --security-opt seccomp=seccomp/chromium.json -v `pwd`/node-ci-demo:/app tkp1n/chromium npm run ci-test
Testing an Angular app
You can test the barebones Angular app in this repo without any changes to the configuration of the project by running the following command inside
npm run test -- --browsers=ChromeHeadless --no-watch
If your application uses a lot of memory, the 64MB of shared memory with which Docker runs the container might not be enough. Run Chromium with the following parameter, to work around this issue: