@@ -2,8 +2,8 @@ import { getSlotMetrics } from '../../src/utils/TimeSlots'
22import * as dates from '../../src/utils/dates'
33
44describe ( 'getSlotMetrics' , ( ) => {
5- const min = dates . startOf ( new Date ( ) , 'day' )
6- const max = dates . endOf ( new Date ( ) , 'day' )
5+ const min = dates . startOf ( new Date ( 2018 , 0 , 29 , 0 , 0 , 0 ) , 'day' )
6+ const max = dates . endOf ( new Date ( 2018 , 0 , 29 , 59 , 59 , 59 ) , 'day' )
77 const slotMetrics = getSlotMetrics ( { min, max, step : 60 , timeslots : 1 } )
88 test ( 'getSlotMetrics.closestSlotToPosition: always returns timeslot if valid percentage is given' , ( ) => {
99 expect ( slotMetrics . closestSlotToPosition ( 0 ) ) . toBeDefined ( )
@@ -24,8 +24,8 @@ describe('getSlotMetrics', () => {
2424} )
2525
2626describe ( 'getRange' , ( ) => {
27- const min = dates . startOf ( new Date ( ) , 'day' )
28- const max = dates . endOf ( new Date ( ) , 'day' )
27+ const min = dates . startOf ( new Date ( 2018 , 0 , 29 , 0 , 0 , 0 ) , 'day' )
28+ const max = dates . endOf ( new Date ( 2018 , 0 , 29 , 59 , 59 , 59 ) , 'day' )
2929 const slotMetrics = getSlotMetrics ( { min, max, step : 60 , timeslots : 1 } )
3030
3131 test ( 'getRange: 15 minute start of day appointment stays within calendar' , ( ) => {
0 commit comments