test(demo): add unit tests for core formatters - #121
Conversation
|
This branch still includes older commits that aren’t part of this change. Pls rebase onto latest main (or open a fresh branch from main and cherry pick only the formatter test commit) so the PR only shows the unit test work. Also, these are mostly happy path checks. A couple of edge cases would make the suite more useful than broader happy path coverage alone. Going forward, please open an issue first when you can so we can align on the use case before a PR lands. That helps keep scope clear and avoids rework. |
Thanks for the review and guidance. I'll get this onto a fresh branch from main so the history is clean, and I'll add some edge-case tests like zero/negative balances and empty strings. |
d55a270 to
5adad8a
Compare
|
I have force-pushed a rebased branch with a clean history and added all the edge case tests requested. |
5adad8a to
5a6cc93
Compare
5a6cc93 to
d0e91a2
Compare
|
ACK d0e91a2 |
Summary
Add comprehensive unit tests for the formatting utilities in the BDK Demo app to ensure balances, addresses, and timestamps display correctly to the user.
Scope
This PR only adds:
bdk_demo/test/core/utils/formatters_test.dartValidation
flutter testpasses locally for all cases.formatTimestampis tested dynamically againstDateTime.now()to prevent timezone/year flakiness.