import { isBetween } from './index' describe('comparisons - isBetween', () => { const periodStartDateString = '2021-01-01T00:00:00.000Z' const periodEndDateString = '2021-01-02T00:00:00.000Z' it.each([ // is 'subjectDate' between 'periodStartDateString' and 'periodEndDateString' ['2020-12-31T23:59:59.000Z', false], ['2021-01-01T00:00:00.000Z', true], ['2021-01-01T23:59:59.000Z', true], ['2021-01-02T00:00:00.000Z', false], ['2021-01-03T00:00:00.000Z', false], ])( 'should determine if a date=%s is same as %s, expected=%s', (subjectDateString, expected) => expect( isBetween( subjectDateString, periodStartDateString, periodEndDateString, { locale: 'en-US', timezone: 'UTC', } ) ).toBe(expected) ) })