Using:
ng test
Angular CLI runs the tests by default in Chrome, which is great, but what if I need to run them in a console-only environment (h
Angular CLI provides all that we need to run tests without a browser.
Open the karma.conf.js file and add the ChromeHeadless to the browsers array -
karma.conf.js
browsers: ['ChromeHeadless'],
Happy testing!