Test migration to jest by hand
Apparently using regular expressions is way easier.
This commit is contained in:
5
test/JSONToDate/JSONToDate.js
Normal file
5
test/JSONToDate/JSONToDate.js
Normal file
@ -0,0 +1,5 @@
|
||||
const JSONToDate = arr => {
|
||||
const dt = new Date(parseInt(arr.toString().substr(6)));
|
||||
return `${dt.getDate()}/${dt.getMonth() + 1}/${dt.getFullYear()}`;
|
||||
};
|
||||
module.exports = JSONToDate;
|
||||
8
test/JSONToDate/JSONToDate.test.js
Normal file
8
test/JSONToDate/JSONToDate.test.js
Normal file
@ -0,0 +1,8 @@
|
||||
const expect = require('expect');
|
||||
const JSONToDate = require('./JSONToDate.js');
|
||||
|
||||
|
||||
test('JSONToDate is a Function', () => {
|
||||
expect(JSONToDate).toBeInstanceOf(Function);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user