aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/util_test.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-06-22 04:19:44 +0800
committerDan Finlay <dan@danfinlay.com>2016-06-22 04:19:44 +0800
commitab15b4c8259d6f6c5ae9d1e51548d73cfc1c67cb (patch)
treeb1390a02f04b43cf78c880c1dbb4c961fbe12dd6 /test/unit/util_test.js
parenta08c3bc01b11fbd0e3a243359befbe9fc909edf4 (diff)
parentcfc056e34ba6dda983a1ca6b4bc090661b799d38 (diff)
downloadtangerine-wallet-browser-ab15b4c8259d6f6c5ae9d1e51548d73cfc1c67cb.tar.gz
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/unit/util_test.js')
-rw-r--r--test/unit/util_test.js16
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() {