diff options
author | Kevin Serrano <kevin.serrano@consensys.net> | 2017-12-28 09:33:28 +0800 |
---|---|---|
committer | Kevin Serrano <kevin.serrano@consensys.net> | 2017-12-28 09:33:28 +0800 |
commit | adf4b89804af8b8f4e9a543a912f548715720d64 (patch) | |
tree | 328742715fa08601e60267160d4acc56fbb346dc /test/unit | |
parent | 3e562f1a1e594955f203b75a0be595e4bd6bca76 (diff) | |
download | tangerine-wallet-browser-adf4b89804af8b8f4e9a543a912f548715720d64.tar tangerine-wallet-browser-adf4b89804af8b8f4e9a543a912f548715720d64.tar.gz tangerine-wallet-browser-adf4b89804af8b8f4e9a543a912f548715720d64.tar.bz2 tangerine-wallet-browser-adf4b89804af8b8f4e9a543a912f548715720d64.tar.lz tangerine-wallet-browser-adf4b89804af8b8f4e9a543a912f548715720d64.tar.xz tangerine-wallet-browser-adf4b89804af8b8f4e9a543a912f548715720d64.tar.zst tangerine-wallet-browser-adf4b89804af8b8f4e9a543a912f548715720d64.zip |
Add additional test to ui utils to account for exact wei values.
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/util_test.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/unit/util_test.js b/test/unit/util_test.js index 1d6e38c5d..59048975a 100644 --- a/test/unit/util_test.js +++ b/test/unit/util_test.js @@ -207,6 +207,12 @@ describe('util', function () { var output = util.normalizeEthStringToWei(input) assert.equal(output.toString(10), '1111111111111111111') }) + + it('should not truncate very exact wei values that do not have extra precision.', function () { + var input = '1.100000000000000001' + var output = util.normalizeEthStringToWei(input) + assert.equal(output.toString(10), '1100000000000000001') + }) }) describe('#normalizeNumberToWei', function () { |