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

Exclude files from running if they match with the ignoring pattern #5341

Merged
merged 1 commit into from
Jan 18, 2018
Merged

Exclude files from running if they match with the ignoring pattern #5341

merged 1 commit into from
Jan 18, 2018

Conversation

mjesun
Copy link
Contributor

@mjesun mjesun commented Jan 18, 2018

Checking the existence of a file into a project via getting all files from haste is not enough. The reason for that is that a parent project might have a child project inside it, which all of its files explicitly blacklisted.

I've added an extra refinement step, where the full file paths are run through the testPathIgnorePatterns method, and returning false if they match (note: the result of the method is reversed, so the ! in front of the call is correct).

I also changed the test to create this particular use case, and verified that it fails on master but passes on the PR. Added entry in CHANGELOG.md as well.

It might also potentially fix #5332.

@SimenB
Copy link
Member

SimenB commented Jan 18, 2018

Could you rebase so we can see that sweet green checkmark?

@codecov-io
Copy link

Codecov Report

Merging #5341 into master will decrease coverage by 0.02%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5341      +/-   ##
==========================================
- Coverage   61.35%   61.32%   -0.03%     
==========================================
  Files         205      205              
  Lines        6906     6909       +3     
  Branches        4        4              
==========================================
  Hits         4237     4237              
- Misses       2668     2671       +3     
  Partials        1        1
Impacted Files Coverage Δ
packages/jest-cli/src/search_source.js 37.64% <0%> (-1.38%) ⬇️

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 054271c...9c1a328. Read the comment docs.

@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 12, 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.

The cli doesn't exit correctly when stdout is a non-tty
4 participants