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

refactor(valid-local-dependency): remove unreachable code #771

Merged
merged 1 commit into from
Jan 27, 2025

Conversation

michaelfaith
Copy link
Collaborator

PR Checklist

Overview

This change removes an unreachable code block. require.resolve will only return a string, if the file is resolvable, or throw an error if it isn't. There's never a case in which require.resolve would return a falsy value.

Closes #118

This change removes an unused codeblock.  `require.resolve` will only return a string, if the file is resolvable, and throw an error if it isn't.  There's never a case in which require.resolve would return a falsy value.
Copy link

codecov bot commented Jan 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.71%. Comparing base (668eaee) to head (6fafaef).
Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #771      +/-   ##
==========================================
+ Coverage   97.86%   98.71%   +0.84%     
==========================================
  Files          19       19              
  Lines        1172     1163       -9     
  Branches      140      139       -1     
==========================================
+ Hits         1147     1148       +1     
+ Misses         25       15      -10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Owner

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😎 ezpz

@JoshuaKGoldberg JoshuaKGoldberg merged commit 2014634 into main Jan 27, 2025
15 checks passed
@JoshuaKGoldberg JoshuaKGoldberg deleted the test/add-coverage branch January 27, 2025 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🧪 Testing: Missing test coverage in valid-local-dependency for !require.resolve(filePath)
2 participants