diff options
author | Dan Finlay <somniac@me.com> | 2016-08-23 02:08:35 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-23 02:08:35 +0800 |
commit | a11979968cc637f7c12512d6d5de08167c705025 (patch) | |
tree | 7a1e6a2e2f9383e0c5461170683eef04f86dabb2 /test | |
parent | 30af7e96cba7a88d46d3376097e4d44b715f834c (diff) | |
parent | 7e3b0aca627179b03a15f768889958fa6f52a3ba (diff) | |
download | tangerine-wallet-browser-a11979968cc637f7c12512d6d5de08167c705025.tar.gz tangerine-wallet-browser-a11979968cc637f7c12512d6d5de08167c705025.tar.zst tangerine-wallet-browser-a11979968cc637f7c12512d6d5de08167c705025.zip |
Merge pull request #562 from MetaMask/ethBalance
Fix issue where a given balance does not need to be parsed
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() { |