From 7e3b0aca627179b03a15f768889958fa6f52a3ba Mon Sep 17 00:00:00 2001 From: Frankie Date: Fri, 19 Aug 2016 17:30:19 -0700 Subject: Add test --- test/unit/util_test.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'test/unit/util_test.js') 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() { -- cgit