Add test for edge case.

feature/default_network_editable
Kevin Serrano 7 years ago
parent 06f496310c
commit 3d627e869b
No known key found for this signature in database
GPG Key ID: BF999DEFC7371BA1
  1. 6
      test/unit/util_test.js

@ -201,6 +201,12 @@ describe('util', function () {
var output = util.normalizeEthStringToWei(input) var output = util.normalizeEthStringToWei(input)
assert.equal(output.toString(10), ethInWei) 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 () { describe('#normalizeNumberToWei', function () {

Loading…
Cancel
Save