Skip to content

test: cover formatting at both extremes - #207

Closed
ZacLou wants to merge 1 commit into
TricklePay:mainfrom
ZacLou:test/issue-148
Closed

test: cover formatting at both extremes#207
ZacLou wants to merge 1 commit into
TricklePay:mainfrom
ZacLou:test/issue-148

Conversation

@ZacLou

@ZacLou ZacLou commented Sep 1, 2026

Copy link
Copy Markdown

Closes #148

Adds explicit coverage for the two formatting boundaries called out in the issue:

  • formatAmount("0") returns "0" instead of an empty string.
  • Values one and two stroops below the max i128 value are formatted without precision loss.

The existing suite already handled empty string as zero and a large value; these cases make the zero and near-maximum boundaries explicit and fail if the formatter is removed or regresses.

npm run test -- lib/format.test.ts and npm run typecheck pass. npm run lint reports pre-existing errors in unrelated files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test formatting of zero and very large amounts

2 participants