* chore: make aware eslint that we use jest By setting up the jest environment, we no longer need to declare the 'test' global in the configuration. * chore: don't need to import expect, it's a jest environment global * chore: don't need to import expect when creating undefined test
9 lines
335 B
JavaScript
9 lines
335 B
JavaScript
const {getDaysDiffBetweenDates} = require('./_30s.js');
|
|
|
|
test('getDaysDiffBetweenDates is a Function', () => {
|
|
expect(getDaysDiffBetweenDates).toBeInstanceOf(Function);
|
|
});
|
|
test('Returns the difference in days between two dates', () => {
|
|
expect(getDaysDiffBetweenDates(new Date('2017-12-13'), new Date('2017-12-22'))).toBe(9);
|
|
});
|