Skip to content
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

fix: removes .html file validation #39

Merged
merged 1 commit into from
Nov 1, 2021

Conversation

jodarove
Copy link
Contributor

@jodarove jodarove commented Nov 1, 2021

This PR fixes forcedotcom/cli#1254 by removing the validation for the existence of ${moduleName}.html to verify the module is a component.

The validation of the existence of the ${moduleName}.html file falls short in some cases:

  1. When the component module uses the render method: importing template files that may have a different name from the module name.
  2. The component inherits from another one and does not override the template (e.g., headless actions)

Note: a more robust validation will be to parse the module .js file and expect that the default export extends another class, but I don't think the benefits will be worth the effort.

It may be that the component module is using the render method (importing its own html files) or that the component inherits from another component and does not overrides the template (headless actions)
@jodarove jodarove merged commit ba85d46 into salesforcecli:master Nov 1, 2021
@jodarove jodarove deleted the jodarove/fix-validation branch November 1, 2021 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ERROR running force:lightning:lwc:test:create: No corresponding HTML file found
2 participants