Skip to content

Increase unit test coverage from 71% to 94.90% - #118

Merged
david22swan merged 2 commits into
mainfrom
increase-test-coverage
Sep 8, 2026
Merged

david22swan merged 2 commits into
mainfrom
increase-test-coverage

Conversation

@bronachfalls

Copy link
Copy Markdown
Contributor

Add tests for previously uncovered methods and branches: #build, #build_package, #create_build_dir, #cleanup_build_dir, #copy_mtime, #package_already_exists?, metadata error paths (missing/unreadable/invalid JSON/caching), validate_source! unreadable branch, ignored_files destination-outside-source branch, stage_module_in_build_dir directory mtime reset, and read_file nil_on_error rescue path.

Summary

Provide a detailed description of all the changes present in this pull request.

Additional Context

Add any additional context about the problem here.

  • Root cause and the steps to reproduce. (If applicable)
  • Thought process behind the implementation.

Related Issues (if any)

Mention any related issues or pull requests.

Checklist

  • 🟢 Spec tests.
  • 🟢 Acceptance tests.
  • Manually verified.

Add tests for previously uncovered methods and branches: #build,
#build_package, #create_build_dir, #cleanup_build_dir, #copy_mtime,
#package_already_exists?, metadata error paths (missing/unreadable/invalid
JSON/caching), validate_source! unreadable branch, ignored_files
destination-outside-source branch, stage_module_in_build_dir directory
mtime reset, and read_file nil_on_error rescue path.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@bronachfalls
bronachfalls requested a review from a team as a code owner September 4, 2026 10:24
Move mock_gz and mock_file from let blocks into the before block as local
variables to reduce memoized helper count from 9 to 8.

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

codecov Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.93%. Comparing base (990c48b) to head (a2746b5).
⚠️ Report is 9 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #118       +/-   ##
===========================================
+ Coverage   71.51%   94.93%   +23.41%     
===========================================
  Files           2        2               
  Lines         158      158               
===========================================
+ Hits          113      150       +37     
+ Misses         45        8       -37     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@david22swan
david22swan merged commit 53d7990 into main Sep 8, 2026
12 checks passed
@david22swan
david22swan deleted the increase-test-coverage branch September 8, 2026 14:40
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