diff options
author | Dan Finlay <dan@danfinlay.com> | 2016-06-22 04:19:44 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2016-06-22 04:19:44 +0800 |
commit | ab15b4c8259d6f6c5ae9d1e51548d73cfc1c67cb (patch) | |
tree | b1390a02f04b43cf78c880c1dbb4c961fbe12dd6 /test | |
parent | a08c3bc01b11fbd0e3a243359befbe9fc909edf4 (diff) | |
parent | cfc056e34ba6dda983a1ca6b4bc090661b799d38 (diff) | |
download | tangerine-wallet-browser-ab15b4c8259d6f6c5ae9d1e51548d73cfc1c67cb.tar tangerine-wallet-browser-ab15b4c8259d6f6c5ae9d1e51548d73cfc1c67cb.tar.gz tangerine-wallet-browser-ab15b4c8259d6f6c5ae9d1e51548d73cfc1c67cb.tar.bz2 tangerine-wallet-browser-ab15b4c8259d6f6c5ae9d1e51548d73cfc1c67cb.tar.lz tangerine-wallet-browser-ab15b4c8259d6f6c5ae9d1e51548d73cfc1c67cb.tar.xz tangerine-wallet-browser-ab15b4c8259d6f6c5ae9d1e51548d73cfc1c67cb.tar.zst tangerine-wallet-browser-ab15b4c8259d6f6c5ae9d1e51548d73cfc1c67cb.zip |
Merge branch 'master' of github.com:MetaMask/metamask-plugin into AutoLint
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/util_test.js | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/test/unit/util_test.js b/test/unit/util_test.js index 12a16999e..e2390c8d4 100644 --- a/test/unit/util_test.js +++ b/test/unit/util_test.js @@ -25,12 +25,26 @@ describe('util', function() { }) }) describe('parseBalance', function() { - it('should render 0.01 eth correctly', function() { + it('should render 12.023 eth correctly', function() { const input = 'A6DA46CCA6858000' const output = util.parseBalance(input) assert.deepEqual(output, ['12', '023']) }) }) + describe('parseBalance', function() { + it('should render 0.0000000342422 eth correctly', function() { + const input = '0x7F8FE81C0' + const output = util.parseBalance(input) + assert.deepEqual(output, ['0', '0000000342422']) + }) + }) + describe('parseBalance', function() { + it('should render 0 eth correctly', function() { + const input = '0x0' + const output = util.parseBalance(input) + assert.deepEqual(output, ['0', '0']) + }) + }) describe('addressSummary', function() { it('should add case-sensitive checksum', function() { |