Files
30-seconds-of-code/test/isSameDate.test.js
2018-10-19 20:18:00 +03:00

13 lines
453 B
JavaScript

const expect = require('expect');
const {isSameDate} = require('./_30s.js');
test('isSameDate is a Function', () => {
expect(isSameDate).toBeInstanceOf(Function);
});
test('isSameDate produces the correct result', () => {
expect(isSameDate(new Date(2010, 10, 20), new Date(2010, 10, 20))).toBeTruthy();
});
test('isSameDate produces the correct result', () => {
expect(isSameDate(new Date(2010, 10, 20), new Date(2010, 10, 21))).toBeFalsy();
});