Page MenuHomePhabricator

[Cashtab] Add mock API call to unit test
ClosedPublic

Authored by bytesofman on Apr 11 2022, 11:41.

Details

Reviewers
emack
Group Reviewers
Restricted Project
Commits
rABC9f2ce665d2a8: [Cashtab] Add mock API call to unit test
Summary

T2393

Mock API call in unit test

Test Plan

Disable your internet connection
npm test and all pass

Diff Detail

Repository
rABC Bitcoin ABC
Branch
op-return-unit-test-mock
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 18792
Build 37375: Build Diffcashtab-tests
Build 37374: arc lint + arc unit

Event Timeline

Issue here is that the getRawTransaction call is not for the tx in question, but its first vin.

This is confusing for anyone coming into these unit tests who did not write them an hour or two ago.

Could be improved by splitting out every tx mock and giving it a name and variable.

bytesofman edited the test plan for this revision. (Show Details)
This revision is now accepted and ready to land.Apr 13 2022, 10:04
This revision was automatically updated to reflect the committed changes.