Is it possible to run Karma with no browsers at all?

Karma needs a browser to be set.

You can make use of PhantomJS instead of Chrome.
Indeed, it's more discreet than a traditional browser launch.


I am going to add my two cents to this.

Correct - Karma requires a browser to run. BUT - you can run Chrome in Headless mode, which means although you do need the browser installed, it will not open it's UI, and you can therefore run the tests purely through an SSH session for example.

We used this configuration for our CI/CD deployments. Our Docker image for running the tests had Chrome installed and we ran them with Chrome headless mode. Worked like a charm.

To use this, simply modify your browsers property in your karma.conf.js

browsers: ['ChromeHeadless']

Hope this might help someone out there who may be looking for something similar...