utils/ts-src/getDays.test.ts

9 lines
245 B
TypeScript
Raw Normal View History

import { getDays} from "./getDays";
test('Should return the correct number of days', () => {
expect(getDays(new Date(2021,0,1), new Date(2021,0,11))).toEqual(10);
expect(getDays(new Date(2021,0,11), new Date(2021,0,1))).toEqual(-10);
});