Skip to content

Add BigInt parameter tests to math.test.ts #16

Description

@Code-Paragon

Problem

The fromStroops function accepts a bigint parameter, but math.test.ts only currently asserts against string inputs.

Expected behavior

The test suite includes assertions verifying that native JavaScript BigInt objects passed into fromStroops correctly convert into decimal strings without precision loss.

Files to update

  • tests/math.test.ts

Project relevance

Soroban i128 values return as BigInts via the XDR parser; testing this integration directly secures the math pipeline against rounding bugs.

Acceptance criteria

  • Feature works as described
  • Tests are added or updated where needed
  • Documentation is updated where needed
  • expect(fromStroops(105000000n)).toBe("10.5000000") or equivalent BigInt assertion is added
  • No TypeScript, lint, test, or build errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions