-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow Angular to pass no browsers to Karma #26537
Comments
I am trying to create a PR, but running into issues with building my local fork. |
@Nvveen, I have seen that error, to build and create an app you can use But in the case we are going to add this feature, the desired implementation would be to allow See: angular-cli/packages/angular_devkit/build_angular/src/builders/application/schema.json Lines 365 to 389 in e3bb258
|
I can't commit either, because the file in that error's directory is an '.mts' file, haha. Otherwise I'd gladly submit a PR with your approach, if I can manage. |
This feature request is now candidate for our backlog! In the next phase, the community has 60 days to upvote. If the request receives more than 20 upvotes, we'll move it to our consideration list. You can find more details about the feature request process in our documentation. |
…in karma builder This commit enables users to disable runnings tests against a browsers. This can be done by using the `--no-browsers` command line flag or setting `browsers` to `false` in the `angular.json` Closes angular#26537
…in karma builder This commit enables users to disable runnings tests against a browsers. This can be done by using the `--no-browsers` command line flag or setting `browsers` to `false` in the `angular.json` Closes angular#26537
…in karma builder This commit enables users to disable runnings tests against a browsers. This can be done by using the `--no-browsers` command line flag or setting `browsers` to `false` in the `angular.json` Closes angular#26537
…in karma builder This commit enables users to disable runnings tests against a browsers. This can be done by using the `--no-browsers` command line flag or setting `browsers` to `false` in the `angular.json` Closes #26537
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
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 inkarma,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=\""
tong test
. The line atangular-cli/packages/angular_devkit/build_angular/src/builders/karma/index.ts
Line 103 in e3bb258
['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
The text was updated successfully, but these errors were encountered: