-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Closed
Labels
area: @angular-devkit/build-angulardevkit/build-angular:karmafeatureIssue that requests a new featureIssue that requests a new featurefeature: votes requiredFeature request which is currently still in the voting phaseFeature request which is currently still in the voting phase
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
| if (options.browsers) { |
['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
Metadata
Metadata
Assignees
Labels
area: @angular-devkit/build-angulardevkit/build-angular:karmafeatureIssue that requests a new featureIssue that requests a new featurefeature: votes requiredFeature request which is currently still in the voting phaseFeature request which is currently still in the voting phase