diff options
author | Frankie <frankie.pangilinan@consensys.net> | 2016-08-20 08:30:19 +0800 |
---|---|---|
committer | Frankie <frankie.pangilinan@consensys.net> | 2016-08-20 08:30:19 +0800 |
commit | 7e3b0aca627179b03a15f768889958fa6f52a3ba (patch) | |
tree | 7a1e6a2e2f9383e0c5461170683eef04f86dabb2 /test | |
parent | edfb0eb96803e4f01a8d4880b44ad220ce4bbb9a (diff) | |
download | tangerine-wallet-browser-7e3b0aca627179b03a15f768889958fa6f52a3ba.tar tangerine-wallet-browser-7e3b0aca627179b03a15f768889958fa6f52a3ba.tar.gz tangerine-wallet-browser-7e3b0aca627179b03a15f768889958fa6f52a3ba.tar.bz2 tangerine-wallet-browser-7e3b0aca627179b03a15f768889958fa6f52a3ba.tar.lz tangerine-wallet-browser-7e3b0aca627179b03a15f768889958fa6f52a3ba.tar.xz tangerine-wallet-browser-7e3b0aca627179b03a15f768889958fa6f52a3ba.tar.zst tangerine-wallet-browser-7e3b0aca627179b03a15f768889958fa6f52a3ba.zip |
Add test
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/util_test.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/unit/util_test.js b/test/unit/util_test.js index 9a3963ac1..45e545e8e 100644 --- a/test/unit/util_test.js +++ b/test/unit/util_test.js @@ -156,7 +156,12 @@ describe('util', function() { var result = util.formatBalance(input) assert.equal(result, '0.00032 ETH') }) - + it('should not parse the balance and return value with 2 decimal points with ETH at the end', function() { + var value = '1.2456789' + var needsParse = false + var result = util.formatBalance(value, 2, needsParse) + assert.equal(result, '1.24 ETH') + }) }) describe('normalizing values', function() { |