Angular 15 comes with fewer configuration files than the previous versions, incl. karma.conf.js
having been dropped. For running ng test --browsers=FirefoxHeadless
under Angular 14, I used to configure karma.conf.js
to require('karma-firefox-launcher')
plugin.
How should this be done in Angular 15?
- is it ok to copy over the full
karma.conf.js
from the previous Angular 14 project and add set"architect.test.options.karmaConfig"
inangular.json
to thatkarma.conf.js
file? - or is there some other way to configure Karma plugins in
angular.json
directly, and would that be better? - and can Angular 15 still help me by generating an initial
karma.conf.js
?
(motivation: my build server executes ng test
in a headless container, so for the sake of a simple build container configuration, I prefer FirefoxHeadless
over the test runner's default browser)