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:
parent
06f496310c
commit
3d627e869b
@ -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 () {
|
||||
|
Loading…
Reference in New Issue
Block a user