aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortrejgun <trejgun@gmail.com>2018-06-24 17:56:07 +0800
committertrejgun <trejgun@gmail.com>2018-06-24 17:56:07 +0800
commit74080e41f11b7bc2668ffdb42404d940139b68a8 (patch)
tree734788ac6388a8fe7d3589fef5edf40e24148d2f
parent0d0120746d93c9b329bcd57f3819fd39903e6ece (diff)
downloadtangerine-wallet-browser-74080e41f11b7bc2668ffdb42404d940139b68a8.tar
tangerine-wallet-browser-74080e41f11b7bc2668ffdb42404d940139b68a8.tar.gz
tangerine-wallet-browser-74080e41f11b7bc2668ffdb42404d940139b68a8.tar.bz2
tangerine-wallet-browser-74080e41f11b7bc2668ffdb42404d940139b68a8.tar.lz
tangerine-wallet-browser-74080e41f11b7bc2668ffdb42404d940139b68a8.tar.xz
tangerine-wallet-browser-74080e41f11b7bc2668ffdb42404d940139b68a8.tar.zst
tangerine-wallet-browser-74080e41f11b7bc2668ffdb42404d940139b68a8.zip
change numbers
-rw-r--r--ui/app/conversion-util.test.js13
1 files changed, 6 insertions, 7 deletions
diff --git a/ui/app/conversion-util.test.js b/ui/app/conversion-util.test.js
index 51dcd1ece..d956998a1 100644
--- a/ui/app/conversion-util.test.js
+++ b/ui/app/conversion-util.test.js
@@ -2,22 +2,21 @@ import assert from 'assert'
import {addCurrencies} from './conversion-util'
-
describe('conversion utils', () => {
describe('addCurrencies()', () => {
it('add whole numbers', () => {
- const result = addCurrencies(3, 5)
- assert.equal(result.toNumber(), 8)
+ const result = addCurrencies(3, 9)
+ assert.equal(result.toNumber(), 12)
})
it('add decimals', () => {
- const result = addCurrencies(1.3, 1.5)
- assert.equal(result.toNumber(), 2.8)
+ const result = addCurrencies(1.3, 1.9)
+ assert.equal(result.toNumber(), 3.2)
})
it('add repeating decimals', () => {
- const result = addCurrencies(1/3, 1/7)
- assert.equal(result.toNumber(), 0.47619047619047616)
+ const result = addCurrencies(1/3, 1/9)
+ assert.equal(result.toNumber(), 0.4444444444444444)
})
})
})