When you run unit tests using the Angular CLI's ng test command you'll often see a browser open up. Sometimes this is useful if you want to debug the unit tests in the browser, however since I have moved the bulk of my unit test debugging to IntelliJ, this is just a minor annoyance.
You can shut it off. Open up the Karma.conf.js file in the src folder of your Angular CLI project. Find this line:
1browsers: ['Chrome'],
This tells Karma to open Chrome to run the tests. But, there is another option:
1browsers: ['ChromeHeadless'],
Rerun your tests and you'll find that no browser opens up.
I love it when things are easy.