Page MenuHomePhabricator

[Cashtab] Pass chronik as a prop to useWallet hook
ClosedPublic

Authored by bytesofman on Feb 5 2024, 08:01.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Commits
rABCfc2531f609eb: [Cashtab] Pass chronik as a prop to useWallet hook
Summary

Pass chronik as a prop to useWallet.js hook. This enables full-app integration testing by passing mock chronik client.

Add a few simple unit tests to confirm this.

Test Plan

npm test

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bytesofman published this revision for review.Feb 5 2024, 08:09
bytesofman added inline comments.
cashtab/src/components/__tests__/AppIntegrations.test.js
1 ↗(On Diff #44955)

It is a bit silly to have an AppIntegrations.test.js and an App.test.js

Will consolidate these to one.

For now, it is useful to have two files to show that this diff does not break old tests and keep the "new format" tests in one place.

This diff will enable much better integration tests across all of Cashtab. Will see some reorganization and refactoring of existing tests to use this model going forward, which tests the app as it actually works in prod.

This revision is now accepted and ready to land.Feb 5 2024, 08:56