Filed from the second-wave repository audit (issue 86/100). See the audit summary for full category context.
- Location:
frontend/src/components/TransactionTracker.tsx
- Problem: The polling effect,
checkConfirmation, and the renderChanges diffing helper (bigint-based) have no unit tests despite non-trivial logic.
- Evidence: No corresponding test file found.
- Suggested implementation: Add tests for
renderChanges given various before/after stream states, and for the polling effect's confirm/timeout behavior using fake timers.
- Acceptance criteria:
renderChanges has table-driven tests covering deposit/withdraw/status-change diffs; the polling effect has a test for both confirm and timeout outcomes.
- Difficulty: M
- Expected impact: Covers a component reused across multiple flows (create, top-up, withdraw, incoming) for logic that's easy to silently break.
frontend/src/components/TransactionTracker.tsxcheckConfirmation, and therenderChangesdiffing helper (bigint-based) have no unit tests despite non-trivial logic.renderChangesgiven various before/after stream states, and for the polling effect's confirm/timeout behavior using fake timers.renderChangeshas table-driven tests covering deposit/withdraw/status-change diffs; the polling effect has a test for both confirm and timeout outcomes.