Skip to content

RecentTransactions has no tests: the dashboard transaction list is uncovered #919

Description

@nanaf6203-bit

RecentTransactions has no tests: the dashboard transaction list is uncovered

Labels / Complexity: testing · Medium Complexity — Medium

Problem

RecentTransactions (src/components/dashboard/RecentTransactions.tsx) renders the recent-transactions list on the dashboard. It has no tests — and it consumes the mock-backed transaction data (#9). A regression that drops rows or mis-formats amounts ships silently in a money-adjacent view.

Why this is architecturally hard

  1. Rendering from the mock contract is the test design. Tests must pin how rows are derived from the transaction shape so the mock-to-real migration (i add sample readme #9) cannot silently change the list.
  2. Empty/error states matter. The list must handle empty and failed loads; tests need store/service fixtures for each.

Acceptance criteria

  • Tests cover populated, empty, and error states with formatted rows.
  • Tests run in CI via npm test.

Out of scope

The transactions mock (#9); other dashboard components.

Getting started

  • src/components/dashboard/RecentTransactions.tsx
  • src/components/dashboard/__tests__/DataRefreshWrapper.test.tsx — the pattern

Commands: npm test.

Good first files to read: src/components/dashboard/RecentTransactions.tsx.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions