celestia-node
celestia-node copied to clipboard
chore(headertest): use ErrorIs on original error and NoError for success
- Replace assert.ErrorIs(t, errors.Unwrap(err), expected) with assert.ErrorIs(t, err, expected) to rely on errors.Is walking the entire unwrap chain, avoiding brittle single-level unwrapping.
- Use assert.NoError(t, err) for cases expecting no error, which is clearer and idiomatic.
- This makes tests robust against changes in error-wrapping depth and improves readability.
@VolodymyrBg, linter complains
@Wondertan , corrected
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 35.34%. Comparing base (2469e7a) to head (cd9c9aa).
:warning: Report is 583 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #4535 +/- ##
==========================================
- Coverage 44.83% 35.34% -9.50%
==========================================
Files 265 304 +39
Lines 14620 24298 +9678
==========================================
+ Hits 6555 8587 +2032
- Misses 7313 14759 +7446
- Partials 752 952 +200
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.