aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/util_test.js
diff options
context:
space:
mode:
authorKevin Serrano <kevgagser@gmail.com>2016-08-23 02:58:59 +0800
committerKevin Serrano <kevgagser@gmail.com>2016-08-23 02:58:59 +0800
commitcec88cc9acb4711c8227502f3477a55b3800ea22 (patch)
tree4af721d931b884d6207b42d18e577b627c246735 /test/unit/util_test.js
parent7a466697d30019a4a1703a19b60ecc78fd063f5d (diff)
parent3756384da6cb7d1566271cb99ec561d3b051a4ac (diff)
downloadtangerine-wallet-browser-cec88cc9acb4711c8227502f3477a55b3800ea22.tar
tangerine-wallet-browser-cec88cc9acb4711c8227502f3477a55b3800ea22.tar.gz
tangerine-wallet-browser-cec88cc9acb4711c8227502f3477a55b3800ea22.tar.bz2
tangerine-wallet-browser-cec88cc9acb4711c8227502f3477a55b3800ea22.tar.lz
tangerine-wallet-browser-cec88cc9acb4711c8227502f3477a55b3800ea22.tar.xz
tangerine-wallet-browser-cec88cc9acb4711c8227502f3477a55b3800ea22.tar.zst
tangerine-wallet-browser-cec88cc9acb4711c8227502f3477a55b3800ea22.zip
Merge branch 'master' into fox-sub
Diffstat (limited to 'test/unit/util_test.js')
-rw-r--r--test/unit/util_test.js7
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() {