aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/util_test.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-08-30 07:14:51 +0800
committerDan Finlay <dan@danfinlay.com>2016-08-30 07:14:51 +0800
commite85418b11ad14bf6f0cc3fdbcdbb5669330c4778 (patch)
treedf71d73fa1533cea8b36fb24db90e02a07766607 /test/unit/util_test.js
parent40d5b446cfbea436a012d1799d0d7710caca752c (diff)
parenta9c738d4d3226f61942641a41c399c75a3e9eb3e (diff)
downloadtangerine-wallet-browser-e85418b11ad14bf6f0cc3fdbcdbb5669330c4778.tar
tangerine-wallet-browser-e85418b11ad14bf6f0cc3fdbcdbb5669330c4778.tar.gz
tangerine-wallet-browser-e85418b11ad14bf6f0cc3fdbcdbb5669330c4778.tar.bz2
tangerine-wallet-browser-e85418b11ad14bf6f0cc3fdbcdbb5669330c4778.tar.lz
tangerine-wallet-browser-e85418b11ad14bf6f0cc3fdbcdbb5669330c4778.tar.xz
tangerine-wallet-browser-e85418b11ad14bf6f0cc3fdbcdbb5669330c4778.tar.zst
tangerine-wallet-browser-e85418b11ad14bf6f0cc3fdbcdbb5669330c4778.zip
Merge branch 'master' into EdgeCompatibility
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() {