1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-23 02:10:12 +01:00

Add test for edge case.

This commit is contained in:
Kevin Serrano 2017-12-27 17:26:38 -08:00
parent 06f496310c
commit 3d627e869b
No known key found for this signature in database
GPG Key ID: BF999DEFC7371BA1

View File

@ -201,6 +201,12 @@ describe('util', function () {
var output = util.normalizeEthStringToWei(input)
assert.equal(output.toString(10), ethInWei)
})
it('should account for overflow numbers gracefully by dropping extra precision.', function () {
var input = '1.11111111111111111111'
var output = util.normalizeEthStringToWei(input)
assert.equal(output.toString(10), '1111111111111111111')
})
})
describe('#normalizeNumberToWei', function () {