HomePhabricator

[Cashtab] Move formatting functions and tests to their own util files

Description

[Cashtab] Move formatting functions and tests to their own util files

Summary: Formatting functions formerly found in utils/validation.js have been moved into a seperate formatting.js file. As well, the tests for these functions have been removed from validation.test.js into a formatting.test.js file.

Test Plan:
cd web/cashtab
grep -r 'formatDate' src/
ensure all imports have been updated
grep -r 'formatFiatBalance' src/
ensure all imports have been updated
grep -r 'formatSavedBalance' src/
ensure all imports have been updated
grep -r 'formatBalance' src/
ensure all imports have been updated

run npm test
ensure all tests pass

Reviewers: bytesofman, #bitcoin_abc

Reviewed By: bytesofman, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D10777

Details

Provenance
kieran709Authored on Jan 6 2022, 20:26
kieran709Pushed on Jan 7 2022, 18:54
Reviewer
Restricted Project
Differential Revision
D10777: [Cashtab] Move formatting functions and tests to their own util files
Parents
rABC204ee4fc8d6d: [Cashtab] Disable localization in unit tests
Branches
Unknown
Tags
Unknown