test(ui): cover formatReversalEventType's three branches directly - #8787
Conversation
Add a standalone unit test for the pure formatReversalEventType helper, asserting each of its three branches: the headline reversal_reverted -> "merge reverted" case, reversal_reopened -> "close reopened", and the generic underscore-humanizing fallback. Previously only the reopened arm was exercised, and only indirectly through ReversalHealthCard's render, so a regression in the reverted or fallback comparison went uncaught. Closes JSONbored#8665
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-26 05:54:44 UTC
Review summary Nits — 3 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
test(ui): cover formatReversalEventType's three branches directly
Add a standalone unit test for the pure formatReversalEventType helper,
asserting each of its three branches: the headline reversal_reverted ->
"merge reverted" case, reversal_reopened -> "close reopened", and the
generic underscore-humanizing fallback. Previously only the reopened arm
was exercised, and only indirectly through ReversalHealthCard's render, so
a regression in the reverted or fallback comparison went uncaught.
Closes #8665
Validation
Verified locally on this branch before opening:
npm run typechecknpx turbo run build:tsc build:verifynpm run test:coverage— patch coverage 100.0% of changed lines