Page MenuHomePhabricator

[Cashtab] Use correct jest syntax in unit tests
ClosedPublic

Authored by bytesofman on Jan 1 2024, 23:38.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC6103f2816be3: [Cashtab] Use correct jest syntax in unit tests
Summary

Found some Cashtab tests using assert instead of jest syntax in unit tests. These can still ... work. Sort of. However the point of using jest is to better test the react environment vs node.

Can see there was one issue in the cashMethods.test.js where the wrong type was being tested and asset did not catch it.

Test Plan

npm test
grep -r assert src/ and no output

Diff Detail

Repository
rABC Bitcoin ABC
Branch
usewallet-tests-patch
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 26091
Build 51755: Build Diffcashtab-tests
Build 51754: arc lint + arc unit

Event Timeline

bytesofman added inline comments.
cashtab/src/utils/__tests__/cashMethods.test.js
129

bugfix: assert deepEqual was accepting '5000' (string) as 5000 (number), jest here does not (better test)

This revision is now accepted and ready to land.Jan 2 2024, 08:51