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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bytesofman added inline comments.
cashtab/src/utils/__tests__/cashMethods.test.js
129 ↗(On Diff #43810)

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