Skip to content

Testing: Enhancement - misc CI updates#2132

Open
JohnathanWhite wants to merge 21 commits intobitpay:developfrom
JohnathanWhite:fix/jest-unit-tests
Open

Testing: Enhancement - misc CI updates#2132
JohnathanWhite wants to merge 21 commits intobitpay:developfrom
JohnathanWhite:fix/jest-unit-tests

Conversation

@JohnathanWhite
Copy link
Copy Markdown
Collaborator

@JohnathanWhite JohnathanWhite commented Apr 13, 2026

RN-2662

  • Unit tests update
  • Lint step
  • Prettier
  • Validate

Redux Reducers (pure functions, highest confidence)

  • store/app/app.reducer.spec.ts — 90 tests covering app state, network switching, identity management
  • store/wallet/wallet.reducer.spec.ts — 64 tests covering key/wallet CRUD, portfolio balance, rate updates
  • store/buy-crypto/buy-crypto.reducer.spec.ts — 45 tests
  • store/card/card.reducer.spec.ts — 46 tests
  • store/transforms/transforms.spec.ts — 56 tests covering Redux persist serialization/deserialization

Redux Effects (mocked dependencies)

  • store/scan/scan.spec.ts — expanded to 80+ tests covering URI parsing for BTC, ETH, XRP, BCH, SOL, BitPay invoice, buy/sell/swap crypto, and third-party provider callback URIs (Banxa, MoonPay, Ramp, Sardine, Simplex, Transak)
  • store/contact/contact.effects.spec.ts — 20 tests covering all 4 contact migration effects
  • store/buy-crypto/buy-crypto.effects.spec.ts — 26 tests
  • store/bitpay-id/bitpay-id.effects.spec.ts — 27 tests
  • store/coinbase/coinbase.effects.spec.ts — 49 tests
  • store/portfolio/portfolio.effects.spec.ts — 26 tests
  • store/wallet/effects/create/create.spec.ts — 21 tests
  • store/wallet/effects/import/import.spec.ts — 25 tests
  • store/wallet/effects/rates/rates.spec.ts — 67 tests
  • store/wallet/effects/status/status.spec.ts — 38 tests
  • store/wallet/effects/errors/errors.spec.ts — 18 tests
  • store/wallet/effects/currencies/currencies.spec.ts — 18 tests
  • store/backup/fs-backup.spec.ts — 20 tests

Utilities (pure functions, highest confidence)

  • utils/helper-methods.spec.ts — 205 tests covering formatting, fiat conversion, address utilities, chain/coin lookups
  • utils/passkey.spec.ts — 30 tests
  • utils/portfolio/assets.pure.spec.ts — 148 tests covering portfolio asset aggregation, PnL calculation, chain grouping
  • utils/portfolio/core/format.spec.ts — 66 tests covering bigint decimal formatting and atomic amount parsing
  • utils/portfolio/core/pnl/analysis.spec.ts — 70 tests
  • utils/portfolio/core/pnl/rates.spec.ts — 40 tests
  • utils/portfolio/core/pnl/snapshots.spec.ts — 80 tests
  • utils/portfolio/core/fiatRateSeries.spec.ts — 18 tests
  • utils/portfolio/rate.spec.ts — 76 tests
  • store/wallet/utils/wallet.spec.ts — 126 tests covering wallet/key building, fiat conversion, account list construction

Components

  • components/anchor/Anchor.spec.tsx
  • components/button/ButtonOverlay.spec.tsx
  • components/feature-card/FeatureCard.spec.tsx
  • components/loader/Loader.spec.tsx
  • components/tabs/Tabs.spec.tsx

Comment thread .github/workflows/test.yml Outdated
Comment thread .github/workflows/test.yml
@JohnathanWhite JohnathanWhite changed the title Testing: Enhancement - Update unit test suite with CI integration Testing: Enhancement - Update CI integration Apr 13, 2026
@JohnathanWhite JohnathanWhite changed the title Testing: Enhancement - Update CI integration Testing: Enhancement - misc CI updates Apr 13, 2026
@gabrielbazan7
Copy link
Copy Markdown
Collaborator

The prettier check is not working

@JohnathanWhite
Copy link
Copy Markdown
Collaborator Author

The prettier check is not working

fixed

gabrielbazan7
gabrielbazan7 previously approved these changes Apr 13, 2026
Copy link
Copy Markdown
Collaborator

@gabrielbazan7 gabrielbazan7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK! great job

@JohnathanWhite JohnathanWhite force-pushed the fix/jest-unit-tests branch 28 times, most recently from 9d781b0 to 5201b28 Compare April 17, 2026 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants