import { isSameDateOnly } from './index' describe('comparisons - isSameDateOnly', () => { it.each([ // is 'subjectDate' same as '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', true], ['2021-01-01T00:00:00.000Z', '2021-01-01T00:01:00.000Z', true], ['2021-01-01T00:00:00.000Z', '2021-01-01T01:00:00.000Z', true], ['2021-01-02T00:00:00.000Z', '2021-01-01T00:00:00.000Z', false], ])( 'should determine if a date=%s is same as %s, expected=%s', (subjectDateString, otherDateString, expected) => expect( isSameDateOnly(subjectDateString, otherDateString, { locale: 'en-US', timezone: 'UTC', }) ).toBe(expected) ) })