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

Tests picked up in yarn cache directory #3827

Closed
jmorrell opened this issue Jun 14, 2017 · 5 comments
Closed

Tests picked up in yarn cache directory #3827

jmorrell opened this issue Jun 14, 2017 · 5 comments

Comments

@jmorrell
Copy link

Do you want to request a feature or report a bug?

Bug

What is the current behavior?

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.

What is the expected behavior?

Jest should ignore the yarn cache directory as a smart default like it currently does for node_modules.

@jmorrell
Copy link
Author

I previously ran into this issue with CRA and tried to fix it there: facebook/create-react-app#2063 but it's probably better to update Jest's defaults.

If there's support for this I'm happy to open a PR.

@jmorrell
Copy link
Author

Or perhaps it would be good to ignore all hidden directories that start with a . by default?

@thymikee
Copy link
Collaborator

@cpojer what do you think?

@jmorrell
Copy link
Author

For anyone hitting this we'll be fixing this by updating the cache directory location. Follow along at: heroku/heroku-buildpack-nodejs#439

@github-actions
Copy link

This issue 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 a pull request may close this issue.

3 participants