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

fix: Pass watchPathIgnorePatterns to Haste instance #7585

Merged
merged 6 commits into from
Jan 21, 2019

Conversation

thymikee
Copy link
Collaborator

@thymikee thymikee commented Jan 7, 2019

Summary

watchPathIgnorePatterns array was used to verify paths returned by haste instance in watch mode. Instead, it should be passed to the project's Haste instance in form of ignorePattern.

Fixes #7544

Test plan

Yet have to come up with how to test that.

@SimenB
Copy link
Member

SimenB commented Jan 7, 2019

This seems reasonable to me, and I like that it centralizes ignoring config. Not sure about a test, could mock out jest-haste-map and inspect the arguments passed in as ignorePattern or inspect ignorePattern after it's assigned to the instance?

@codecov-io
Copy link

codecov-io commented Jan 7, 2019

Codecov Report

Merging #7585 into master will decrease coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #7585      +/-   ##
=========================================
- Coverage      68%     68%   -0.01%     
=========================================
  Files         248     248              
  Lines        9490    9489       -1     
  Branches        6       6              
=========================================
- Hits         6454    6453       -1     
  Misses       3034    3034              
  Partials        2       2
Impacted Files Coverage Δ
packages/jest-cli/src/lib/is_valid_path.js 100% <ø> (ø) ⬆️
packages/jest-runtime/src/index.js 76.92% <ø> (ø) ⬆️
packages/jest-cli/src/watch.js 81.14% <0%> (ø) ⬆️

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 938f146...dc0650a. Read the comment docs.

@thymikee
Copy link
Collaborator Author

thymikee commented Jan 7, 2019

Added a new Runtime-statics.test.js with only Runtime.createHasteMap static test. We can expand this further later (I'm not sure how much of this is covered in e2e tests), but for now I just wanted this to be scoped to the fix.

@SimenB SimenB closed this Jan 20, 2019
@SimenB SimenB reopened this Jan 20, 2019
@SimenB
Copy link
Member

SimenB commented Jan 20, 2019

Sorry, wrong button 😅 @thymikee mind rebasing?

@thymikee
Copy link
Collaborator Author

@SimenB updated, can you give it one more check and merge?

@SimenB SimenB merged commit 2434d47 into jestjs:master Jan 21, 2019
captain-yossarian pushed a commit to captain-yossarian/jest that referenced this pull request Jul 18, 2019
@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.

--watch should not open inotify watches for files and folders listed in watchPathIgnorePatterns.
4 participants