import { isAfterDateOnly } from './index' describe('comparisons - isAfterDateOnly', () => { it.each([ // is 'subjectDate' after 'otherDate' ['2020-12-31T23:59:59.000Z', '2021-01-01T00:00:00.000Z', false], ['2021-01-01T00:00:00.000Z', '2021-01-01T00:00:00.000Z', false], ['2021-01-01T00:00:00.000Z', '2021-01-01T00:00:01.000Z', false], ['2021-01-01T00:00:01.000Z', '2021-01-01T00:00:00.000Z', false], ['2021-01-01T00:01:00.000Z', '2021-01-01T00:00:00.000Z', false], ['2021-01-01T01:00:00.000Z', '2021-01-01T00:00:00.000Z', false], ['2021-01-01T23:59:59.000Z', '2021-01-01T00:00:00.000Z', false], ['2021-01-02T00:00:00.000Z', '2021-01-01T00:00:00.000Z', true], ['2021-02-01T00:00:00.000Z', '2021-01-01T00:00:00.000Z', true], ['2022-01-01T00:00:00.000Z', '2021-01-01T00:00:00.000Z', true], ])( 'should determine if a date=%s is after %s, expected=%s', (subjectDateString, otherDateString, expected) => expect( isAfterDateOnly(subjectDateString, otherDateString, { locale: 'en-US', timezone: 'UTC', }) ).toBe(expected) ) })