Skip to content

Commit

Permalink
add more test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Dhaiwat10 committed Oct 13, 2024
1 parent b727cd9 commit 7805a56
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/math/src/bn.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,9 @@ describe('Math - BN', () => {
expect(bn.parseUnits('.').toHex()).toEqual(bn('0').toHex());
expect(bn.parseUnits('.', 5).toHex()).toEqual(bn('0').toHex());
expect(bn.parseUnits('1', 0).toHex()).toEqual(bn('1').toHex());
expect(bn.parseUnits('0.000000001', 0).toHex()).toEqual(bn('0').toHex());
expect(bn.parseUnits('100.00002', 0).toHex()).toEqual(bn('100').toHex());
expect(bn.parseUnits('100,100.00002', 0).toHex()).toEqual(bn('100100').toHex());

expect(() => {
bn.parseUnits('100,100.000002', 5);
Expand Down

0 comments on commit 7805a56

Please sign in to comment.