update test folder, run tdd

This commit is contained in:
Stefan Feješ
2018-01-11 10:15:13 +01:00
parent 44d40f48ec
commit 6fddd38fd5
2 changed files with 0 additions and 22 deletions

View File

@ -1,8 +0,0 @@
module.exports = toEnglishDate = time => {
try {
return new Date(time)
.toISOString()
.split('T')[0]
.replace(/-/g, '/');
} catch (e) {}
};

View File

@ -1,14 +0,0 @@
const test = require('tape');
const toEnglishDate = require('./toEnglishDate.js');
test('Testing toEnglishDate', (t) => {
//For more information on all the methods supported by tape
//Please go to https://github.com/substack/tape
t.true(typeof toEnglishDate === 'function', 'toEnglishDate is a Function');
// t.equal(toEnglishDate('09/21/2010'), '21/09/2010', 'Converts a date from American format to English format');
//t.deepEqual(toEnglishDate(args..), 'Expected');
//t.equal(toEnglishDate(args..), 'Expected');
//t.false(toEnglishDate(args..), 'Expected');
//t.throws(toEnglishDate(args..), 'Expected');
t.end();
});