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

jest-haste-map: only file IO errors should be silently ignored #3816

Merged
merged 3 commits into from Jun 14, 2017

Conversation

jeanlauliac
Copy link
Contributor

@jeanlauliac jeanlauliac commented Jun 14, 2017

It is not proper to put all the errors in the same basket, because some types of errors, such as SyntaxError, should definitely not be let ignored, and should instead crash the program right away.

What I propose is that we reduce the errors we handle here to a very specific and reduced set, and that we progressively add more codes or kind of errors if really necessary.

This follows up #3812.

Test plan

Automated tests.

@jeanlauliac
Copy link
Contributor Author

I'm fixing the tests.

@codecov-io
Copy link

Codecov Report

Merging #3816 into master will decrease coverage by <.01%.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3816      +/-   ##
==========================================
- Coverage   57.64%   57.63%   -0.01%     
==========================================
  Files         194      194              
  Lines        6780     6782       +2     
  Branches        6        6              
==========================================
+ Hits         3908     3909       +1     
- Misses       2869     2870       +1     
  Partials        3        3
Impacted Files Coverage Δ
packages/jest-cli/src/reporters/CoverageWorker.js 81.81% <ø> (ø) ⬆️
packages/jest-cli/src/TestWorker.js 0% <ø> (ø) ⬆️
packages/jest-haste-map/src/worker.js 93.75% <ø> (ø) ⬆️
packages/jest-haste-map/src/index.js 92.59% <50%> (-0.36%) ⬇️

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 89c5065...2d905cb. Read the comment docs.

@cpojer cpojer merged commit 79eed25 into jestjs:master Jun 14, 2017
@cpojer
Copy link
Member

cpojer commented Jun 14, 2017

Nice!

@jeanlauliac jeanlauliac deleted the ignore-only-io-errors branch June 14, 2017 14:20
tushardhole pushed a commit to tushardhole/jest that referenced this pull request Aug 21, 2017
…s#3816)

* jest-haste-map: only file IO errors should be silently ignored

* fix tests

* remove extra line
@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.

None yet

4 participants