Skip to content

refactor: remove findFilePath dead code path and make cache required#295

Merged
mcarvin8 merged 1 commit into
mainfrom
refactor/remove-findfilepath-dead-code
May 29, 2026
Merged

refactor: remove findFilePath dead code path and make cache required#295
mcarvin8 merged 1 commit into
mainfrom
refactor/remove-findfilepath-dead-code

Conversation

@mcarvin8
Copy link
Copy Markdown
Owner

Summary

  • The no-cache fallback in findFilePath always returned undefined and was unreachable — both callers in coverageTransformer.ts always supply a filePathCache
  • Removed the optional wrapper function, inlined the lookup logic as the exported function, and made filePathCache a required parameter
  • Removed the two unit tests that covered the dead path (without cache describe block)
  • findFilePath.ts shrinks from 41 lines to 14

Test plan

  • 110 unit tests pass (npm run test:only) — 100% coverage (203/203 branches)

🤖 Generated with Claude Code

The no-cache fallback path always returned undefined and was never
reachable in practice (both callers in coverageTransformer always
supply a filePathCache). Removed the optional wrapper, inlined the
cache lookup as the exported function, and made filePathCache a
required parameter. Deleted the two tests that covered the dead path.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/utils/findFilePath.ts 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mcarvin8 mcarvin8 merged commit 2ef2a5e into main May 29, 2026
11 checks passed
@mcarvin8 mcarvin8 deleted the refactor/remove-findfilepath-dead-code branch May 29, 2026 13:51
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.

2 participants