-
-
Notifications
You must be signed in to change notification settings - Fork 115
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
Jest tests copied to output folder when using --generate-delta #744
Comments
Hi @mmindenhall! Thanks for raising this very well detailed issue and thanks for contributing in making this project better! What is the content of the Do you reproduce it with any LWC component ? Or some of them have particularities? |
Hi @scolladon! Here's the # List files or directories below to ignore them when running force:source:push, force:source:pull, and force:source:status
# More information: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm
#
package.xml
# LWC configuration files
**/jsconfig.json
**/.eslintrc.json
# LWC Jest
**/__tests__/**
# Profiles
**/force-app/main/default/profiles/**
# Fields
**/Contact/fields/CleanStatus.field-meta.xml
# Custom Index
**/force-app/main/default/customindex/**
**/AppSwitcher.appMenu-meta.xml
**/LightningService_UtilityBar.flexipage-meta.xml
**/profiles/** I'm pretty sure the behavior will happen with any LWC component when using |
BTW I took a quick peek at the source code, and I think this is what's happening. The |
Thank you for spiking a bit @mmindenhall. Stay tuned! |
Shipped in release $ sfdx plugins:install sfdx-git-delta@latest-rc
$ sfdx plugins:install sfdx-git-delta@v5.32.0 Happy incremental deployment! |
Issue verification check:
What is the problem?
My employer has been gradually building jest tests for LWCs.
When there are changes in the source of an LWC with jest tests,
sgd --generate-delta
copies the__tests__
folder (contains the jest test sources) to the output folder, despite the.forceignore
passed tosgd
specifying that this folder should be ignored.What is the parameter and the value you used with it?
See reproduction steps below.
What is the expected result?
The expected result is that the output folder would not contain the
__tests__
folder for any LWC with jest tests.What is the actual result?
The output folder contains the
__tests__
folder and its contents, which causes the subsequentsf force source deploy -p /tmp/output/folder
command to fail due to the jest.js
file(s) not being deployable.Steps to reproduce
Clone my sfdx-git-delta-reproduction-playground fork
Check out the
issue/744
branchRun this command:
Verify that the
__tests__
folder was copied into the tree in theoutput
folderExecution context
Operating System: …
Darwin Kernel Version 23.0.0: Fri Sep 15 14:41:43 PDT 2023; root:xnu-10002.1.13~1/RELEASE_ARM64_T6000
yarn version: …
1.22.19
node version: …
v18.16.0
git version: …
git version 2.43.0
sfdx version: …
@salesforce/cli/2.21.8 darwin-arm64 node-v18.16.0
sgd plugin version: …
sfdx-git-delta 5.31.1
More information (optional)
The text was updated successfully, but these errors were encountered: