mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 09:57:02 +01:00
Add test
This commit is contained in:
parent
edfb0eb968
commit
7e3b0aca62
@ -156,7 +156,12 @@ describe('util', function() {
|
|||||||
var result = util.formatBalance(input)
|
var result = util.formatBalance(input)
|
||||||
assert.equal(result, '0.00032 ETH')
|
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() {
|
describe('normalizing values', function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user