Skip to content

Ignore Jest Test directory when using a non-tracked org #537

Closed

Description

@sgkmills

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.

Activity

  1. lcampos commented on Aug 4, 2020

    @lcampos

    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 ?

    cc @WillieRuemmele

  2. sgkmills commented on Aug 25, 2020

    @sgkmills
    Author

    To followup, I attached my forceignore file. FYI, I had to change the filename to forceignore.txt to attach it.

    forceignore.txt

  3. Bobnix commented on Sep 8, 2020

    @Bobnix

    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"

  4. added
    feature
    on Oct 6, 2020
  5. uip-robot-zz commented on Oct 25, 2021

    @uip-robot-zz

    This issue has been linked to a new work item: W-10080138

  6. mshanemc commented on Oct 28, 2021

    @mshanemc
    Contributor

    I think this is fixed in the new source:beta commands that hit RC today. @Bobnix @sgkmills #1258

  7. mshanemc commented on Apr 1, 2022

    @mshanemc
    Contributor

    closed with new commands GA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions