aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2018-04-04 04:52:01 +0800
committerDan Finlay <dan@danfinlay.com>2018-04-04 04:58:26 +0800
commit74049c19fce8ee77b1fa9933e26ac3569e3513f9 (patch)
tree324a93b0ce8418d047715e9d2c467e06c5410bba /test/unit
parent3e4b11e0d701441720bec665167984240a2aca56 (diff)
downloadtangerine-wallet-browser-74049c19fce8ee77b1fa9933e26ac3569e3513f9.tar
tangerine-wallet-browser-74049c19fce8ee77b1fa9933e26ac3569e3513f9.tar.gz
tangerine-wallet-browser-74049c19fce8ee77b1fa9933e26ac3569e3513f9.tar.bz2
tangerine-wallet-browser-74049c19fce8ee77b1fa9933e26ac3569e3513f9.tar.lz
tangerine-wallet-browser-74049c19fce8ee77b1fa9933e26ac3569e3513f9.tar.xz
tangerine-wallet-browser-74049c19fce8ee77b1fa9933e26ac3569e3513f9.tar.zst
tangerine-wallet-browser-74049c19fce8ee77b1fa9933e26ac3569e3513f9.zip
Internationalize currency
Fixes #3580
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/balance-formatter-test.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/unit/balance-formatter-test.js b/test/unit/balance-formatter-test.js
new file mode 100644
index 000000000..0fdb7f618
--- /dev/null
+++ b/test/unit/balance-formatter-test.js
@@ -0,0 +1,17 @@
+const assert = require('assert')
+const currencyFormatter = require('currency-formatter')
+const infuraConversion = require('../../ui/app/infura-conversion.json')
+
+describe.only('currencyFormatting', function () {
+ it('be able to format any infura currency', function (done) {
+ const number = 10000
+
+ infuraConversion.objects.forEach((conversion) => {
+ const code = conversion.quote.code.toUpperCase()
+ const result = currencyFormatter.format(number, { code })
+ assert.ok(result, `Currency ${code} formatted as ${result}`)
+ })
+
+ done()
+ })
+})