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

Ignore dot dirs default #3935

Closed
wants to merge 2 commits into from

Conversation

jmorrell
Copy link

Fixes: #3827

Summary

Makes jest ignore directories that start with a . by default in addition to ignoring node_modules. Ex: .cache

Motivation
When $HOME is the same as the application directory yarn will default to putting its cache directory at $APP_DIR/.cache/yarn/v1/... and Jest will pick up tests in dependencies.

This happens to users trying to use Jest with Heroku CI, where $HOME is /app. Currently any user using both yarn and jest will hit this issue in that environment.

Test plan

  • Added unit tests
  • yarn test

@codecov-io
Copy link

Codecov Report

Merging #3935 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #3935   +/-   ##
======================================
  Coverage    58.1%   58.1%           
======================================
  Files         196     196           
  Lines        6752    6752           
  Branches        6       6           
======================================
  Hits         3923    3923           
  Misses       2826    2826           
  Partials        3       3
Impacted Files Coverage Δ
packages/jest-config/src/defaults.js 100% <ø> (ø) ⬆️
packages/jest-config/src/valid_config.js 100% <ø> (ø) ⬆️
packages/jest-config/src/constants.js 100% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ac25993...527ff8a. Read the comment docs.

@cpojer
Copy link
Member

cpojer commented Jun 29, 2017

Thank you but I don't believe I'd like to set this as default behavior at this point.

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tests picked up in yarn cache directory
4 participants