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
feat(angular): support application builder for cypress component testing #20214
feat(angular): support application builder for cypress component testing #20214
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
☁️ Nx Cloud ReportCI is running/has finished running commands for commit bb4f2c4. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 6 targets
Sent with 💌 from NxCloud. |
Signed-off-by: Pascal Küsgen <pascalkuesgen@gmail.com>
7add667
to
bb4f2c4
Compare
@@ -322,6 +322,7 @@ function withSchemaDefaults(options: any): BrowserBuilderSchema { | |||
options.outputHashing ??= 'none'; | |||
options.progress ??= true; | |||
options.scripts ??= []; | |||
options.main = options.main ??= options.browser; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
options.main ??= options.browser;
I'd also move the options check after this, so you only have 1 condition/branch:
if (!options.main) {
throw new Error('Missing executor options "main" and "browser"');
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, removed the check here: #20382
I like the co-location of the checks that throw errors more then having only a single condition/branch.
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
Current Behavior
Using the Application Builder as the executor the "component-test" target fails using cypress because the
main
property in theoptions
-object was renamed tobrowser
.Expected Behavior
Use the
browser
property when themain
property is missing.See: https://angular.io/guide/esbuild#using-the-application-builder