Skip to content

Fix formatting tests for issue #610#1

Open
teslims2 wants to merge 1 commit intomainfrom
feature/issue-610-formatting-tests
Open

Fix formatting tests for issue #610#1
teslims2 wants to merge 1 commit intomainfrom
feature/issue-610-formatting-tests

Conversation

@teslims2
Copy link
Copy Markdown
Owner

This PR fixes the failing tests for formatting utilities.

Changes

  • Corrected the expected value for timeAgo with future timestamps in src/test/formatting.test.ts
  • Fixed the expected value for formatTokenAmount with large numbers in src/utils/formatting.test.ts

Tests

All formatting tests now pass, including:

  • formatXLM with integers, decimals, and zero
  • truncateAddress with short and long addresses
  • stroopsToXLM and xlmToStroops with known values
  • Round-trip conversions: xlmToStroops(stroopsToXLM(x)) === x
  • Edge cases with zero and large numbers

Closes Ejirowebfi#610

- Correct expected values in formatting.test.ts for timeAgo future timestamps
- Fix expected value in utils/formatting.test.ts for large numbers

Closes Ejirowebfi#610
teslims2 pushed a commit that referenced this pull request Mar 29, 2026
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.

Add Frontend Unit Tests for Formatting Utils

1 participant