Files
30-seconds-of-code/test/getDaysDiffBetweenDates/getDaysDiffBetweenDates.test.js
Angelos Chalaris a78f5db260 Test migration to jest by hand
Apparently using regular expressions is way easier.
2018-06-18 15:15:56 +03:00

10 lines
371 B
JavaScript

const expect = require('expect');
const getDaysDiffBetweenDates = require('./getDaysDiffBetweenDates.js');
test('getDaysDiffBetweenDates is a Function', () => {
expect(getDaysDiffBetweenDates).toBeInstanceOf(Function);
});
t.equal(getDaysDiffBetweenDates(new Date('2017-12-13'), new Date('2017-12-22')), 9, "Returns the difference in days between two dates");