Migrated tests to jest

Used jest-codemods to migrate, will have to pass everything by hand before we can merge.
This commit is contained in:
Angelos Chalaris
2018-06-18 14:18:25 +03:00
parent ae8cd7ee50
commit 5afe81452a
890 changed files with 6950 additions and 6921 deletions

View File

@ -1,18 +0,0 @@
const test = require('tape');
const toCurrency = require('./toCurrency.js');
test('Testing toCurrency', (t) => {
//For more information on all the methods supported by tape
//Please go to https://github.com/substack/tape
t.true(typeof toCurrency === 'function', 'toCurrency is a Function');
t.equal(toCurrency(123456.789, 'EUR'), '€ 123,456.79', 'currency: Euro | currencyLangFormat: Local');
t.equal(toCurrency(123456.789, 'USD', 'en-us'), '$123,456.79', ' currency: US Dollar | currencyLangFormat: English (United States)');
//t.equal(toCurrency(123456.789, 'USD', 'fa'), '۱۲۳٬۴۵۶٫۷۹ ؜$', 'currency: US Dollar | currencyLangFormat: Farsi'); - These break in node
t.equal(toCurrency(322342436423.2435, 'JPY'), 'JP¥ 322,342,436,423', 'currency: Japanese Yen | currencyLangFormat: Local');
//t.equal(toCurrency(322342436423.2435, 'JPY', 'fi'), '322 342 436 423 ¥', 'currency: Japanese Yen | currencyLangFormat: Finnish'); - These break in node
//t.deepEqual(toCurrency(args..), 'Expected');
//t.equal(toCurrency(args..), 'Expected');
//t.false(toCurrency(args..), 'Expected');
//t.throws(toCurrency(args..), 'Expected');
t.end();
});