diff --git a/test/toCurrency/toCurrency.js b/test/toCurrency/toCurrency.js new file mode 100644 index 000000000..796e42ae4 --- /dev/null +++ b/test/toCurrency/toCurrency.js @@ -0,0 +1,2 @@ +const toCurrency = (n, curr, LanguageFormat = undefined) => new Intl.NumberFormat(LanguageFormat, { style: 'currency', currency: curr }).format(n); +module.exports = toCurrency \ No newline at end of file diff --git a/test/toCurrency/toCurrency.test.js b/test/toCurrency/toCurrency.test.js new file mode 100644 index 000000000..5da0952c0 --- /dev/null +++ b/test/toCurrency/toCurrency.test.js @@ -0,0 +1,13 @@ +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.deepEqual(toCurrency(args..), 'Expected'); + //t.equal(toCurrency(args..), 'Expected'); + //t.false(toCurrency(args..), 'Expected'); + //t.throws(toCurrency(args..), 'Expected'); + t.end(); +}); \ No newline at end of file