Skip to content

test: add unit tests to high-risk untested modules#765

Open
bmc08gt wants to merge 4 commits into
code/cashfrom
test/add-unit-tests-high-risk-modules
Open

test: add unit tests to high-risk untested modules#765
bmc08gt wants to merge 4 commits into
code/cashfrom
test/add-unit-tests-high-risk-modules

Conversation

@bmc08gt
Copy link
Copy Markdown
Collaborator

@bmc08gt bmc08gt commented May 22, 2026

No description provided.

@bmc08gt bmc08gt self-assigned this May 22, 2026
@github-actions github-actions Bot added type: test Test additions or improvements area: payments Payments, transfers, intents, billing area: crypto Solana, keys, encryption, signing area: network gRPC, connectivity, API, exchange rates labels May 22, 2026
@bmc08gt bmc08gt force-pushed the test/add-unit-tests-high-risk-modules branch from 32d164d to 91b6e71 Compare May 22, 2026 20:02
@github-actions github-actions Bot added area: onramp Deposit, purchase, Coinbase, fiat on-ramp area: tokens Token accounts, balances, token info labels May 22, 2026
@bmc08gt bmc08gt force-pushed the test/add-unit-tests-high-risk-modules branch from 91b6e71 to 5f9d8b7 Compare May 22, 2026 20:08
bmc08gt added 4 commits May 22, 2026 16:11
Add ~134 unit tests across encryption, Solana instructions, network
utilities, payments, onramp, and persistence modules. Also fix main
branch reference in CLAUDE.md (main → code/cash).

Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
Add 56 tests across 6 new test files:
- WithdrawalViewModel, DepositViewModel, BalanceViewModel,
  MyAccountScreenViewModel pure state reducer tests
- ActivityFeedMessageMapper and UserProfileMapper protobuf
  mapping tests
Add 56 tests across 3 new test files for high-use flows:
- CashScreenViewModelStateTest (13 tests): state reducers,
  computed props (canGive, maxAvailableForGive, isError)
- SwapViewModelStateTest (22 tests): state reducers, computed
  props (canTransact, sellFee, netTransferAmount, transactionLimit,
  isError), all progress states
- OnRampViewModelStateTest (21 tests): state reducers, provider
  selection logic (canChangeCurrency), AmountEntryState computed
  props, minimumPurchaseAmount
Add 18 tests covering currency change reducers, OnSwapIdChanged,
Solflare/Backpack provider selection, loading state reset roundtrips,
and purpose-specific computed properties (netTransferAmount, feeAmount,
transactionLimit, maxAvailableToSwap).

Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
@bmc08gt bmc08gt force-pushed the test/add-unit-tests-high-risk-modules branch from 5f9d8b7 to 670e0fa Compare May 22, 2026 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: crypto Solana, keys, encryption, signing area: network gRPC, connectivity, API, exchange rates area: onramp Deposit, purchase, Coinbase, fiat on-ramp area: payments Payments, transfers, intents, billing area: tokens Token accounts, balances, token info type: test Test additions or improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant