Skip to content

Commit

Permalink
Add more tests for parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
vgrichina committed Dec 20, 2019
1 parent 0fbdf83 commit fe9adde
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/utils/format.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ test('converting near to account balance units', async() => {
expect(nearlib.utils.format.parseNearAmount('999.998999999999837087887000')).toEqual('999998999999999837087887000');
expect(nearlib.utils.format.parseNearAmount('0.000000000000001')).toEqual('1000000000');
expect(nearlib.utils.format.parseNearAmount('0.000001')).toEqual('1000000000000000000');

expect(nearlib.utils.format.parseNearAmount('.000001')).toEqual('1000000000000000000');
expect(nearlib.utils.format.parseNearAmount('000000.000001')).toEqual('1000000000000000000');

try {
// Too many decimals
Expand Down

0 comments on commit fe9adde

Please sign in to comment.