Skip to content

test(decode): add coverage for expected helper and unreachable diagnostic paths#55

Closed
harningt wants to merge 2 commits into
developfrom
feature/error-reporting-coverage-fix
Closed

test(decode): add coverage for expected helper and unreachable diagnostic paths#55
harningt wants to merge 2 commits into
developfrom
feature/error-reporting-coverage-fix

Conversation

@harningt

Copy link
Copy Markdown
Owner

Resolves coverage gaps in lua/json/decode.lua and lua/json/decode/util.lua:

  • Expected Helper Coverage: Added test_util_expected_helper and test_util_expected_single_helper tests to cover both paths of the expected(...) function in util.lua.
  • Diagnostic Decoder Cleanup: Removed the dead if not parsed and return state.previous checks in diagnostic_decoder (which always matches/fails without returning).
  • Decoder Assertion Guard: Added an assert(false) guard at the end of the diagnostic_decoder loop noting that it is unreachable under normal runtime conditions.

@codecov

codecov Bot commented May 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 95.97%. Comparing base (e883555) to head (2e4b56b).
⚠️ Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
lua/json/decode.lua 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop      #55      +/-   ##
===========================================
+ Coverage    95.42%   95.97%   +0.55%     
===========================================
  Files           18       18              
  Lines         1071     1069       -2     
===========================================
+ Hits          1022     1026       +4     
+ Misses          49       43       -6     

☔ View full report in Codecov by Sentry.
📢 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.

@harningt harningt closed this May 26, 2026
@harningt harningt deleted the feature/error-reporting-coverage-fix branch May 26, 2026 01:28
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.

1 participant