-
Notifications
You must be signed in to change notification settings - Fork 409
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: SFDX:Rename Component now also rename the test file that has the same name as component under __tests__ folder for LWC components #4020
Conversation
@@ -39,7 +41,7 @@ describe('Force Rename Lightning Component', () => { | |||
readdirStub | |||
.onFirstCall().resolves([]) | |||
.onSecondCall().resolves([]) | |||
.onThirdCall().resolves([itemsInHero[1]]); | |||
.onThirdCall().resolves([itemsInHero[0]]); |
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.
did this change for any particular reason?
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.
oh I see... moving the tests got it
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 stuff thanks for the quick turn around 👍
QE: Bugs: |
@gbockus-sf I think it is because that "isDuplicate" function only check for the existing LWC and Aura Components name aka the folder names. If we check every file name under LWC or Aura for duplicate, when the number of components is large, "rename component" command can be slow. But we can try to implement it and test for the execution time to see if it's acceptable. |
@floralan I don't think it's a blocker for this PR. We can discuss the issue and see if it makes sense to worry about it. It would be good to add your above comment to the issue I created. |
@gbockus-sf Sounds great! I'll get this PR merged and discuss the issue in the charter of the ticket. |
What does this PR do?
Enable SFDX: Rename Component command to rename the test file under
__tests__
folder for LWC components. Only the test file that has the same name as component will be renamed.What issues does this PR fix or reference?
@W-10976932@
Functionality Before
SFDX: Rename Component does not rename test file under tests folder in LWC components.
Functionality After
SFDX: Rename Component now rename the test file in LWC components as well.