You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Ignore Jest Test directory when using a non-tracked org #537
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
When using a non-tracked org, the 'Push-or-deploy-or-save' setting will try to save JEST test files to the org, but it shouldn't. Since the force:source:deploy command doesn't use the .forceignore file, it isn't ignoring the 'tests' directory.
Describe the solution you'd like
A clear and concise description of what you want to happen.
Have the 'force:source:deploy' use the .forceignore file so the files/directories listed in there are not pushed to non-tracked org when you try to save a JEST test file and you have the 'Push-or-deploy-or-save' setting enabled. Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Turning off the 'Push-or-deploy-or-save' setting and manually deploy the files I need to non-tracked org
Additional context
Add any other context or screenshots about the feature request here.
Thanks for opening this @sgkmills . sfdx force:source:deploy command does use the .forceignore file, I wonder if this is a bug on how we're using the glob patterns or if it's a configuration issue. Can you provide the .forceignore configuration you are using to ignore the jest tests ?
I am experiencing the same while doing the exercises in the Trailhead module, "Lightning Web Components Tests". My forceignore is the same as @sgkmills. This bug results in every file under __tests__ attempting to push on save and returning the error "The LightningComponentBundle named COMPONENT_NAME_HERE was not found in the workspace. SourceElementDoesNotExist"
Activity
lcampos commentedon Aug 4, 2020
Thanks for opening this @sgkmills . sfdx force:source:deploy command does use the
.forceignorefile, I wonder if this is a bug on how we're using the glob patterns or if it's a configuration issue. Can you provide the.forceignoreconfiguration you are using to ignore the jest tests ?cc @WillieRuemmele
sgkmills commentedon Aug 25, 2020
To followup, I attached my forceignore file. FYI, I had to change the filename to forceignore.txt to attach it.
forceignore.txt
Bobnix commentedon Sep 8, 2020
I am experiencing the same while doing the exercises in the Trailhead module, "Lightning Web Components Tests". My forceignore is the same as @sgkmills. This bug results in every file under
__tests__attempting to push on save and returning the error "The LightningComponentBundle named COMPONENT_NAME_HERE was not found in the workspace. SourceElementDoesNotExist"uip-robot-zz commentedon Oct 25, 2021
This issue has been linked to a new work item: W-10080138
mshanemc commentedon Oct 28, 2021
I think this is fixed in the new
source:betacommands that hit RC today. @Bobnix @sgkmills #1258mshanemc commentedon Apr 1, 2022
closed with new commands GA