aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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() {