Closed
Description
Command
test
Description
Karma has a CLI option --no-browsers
to allow Karma to open without any connected browsers. This can be achieved in Angular by passing an empty []
array in karma,conf.js
. This is useful when running the dev server in a devcontainer, where no display server and instances of browsers are installed. Manually opening a browser with the ports forwarded then runs the tests like normal.
The issue starts when using the built-in Karma config, but passing either "browsers": ""
, or the CLI flag "--browsers=\""
to ng test
. The line at
['Chrome']
is instead used.
Describe the solution you'd like
Changing this line to if (options.browsers != null)
and filtering the split array by non-empty strings should solve this particular issue.
Describe alternatives you've considered
No response