Skip to content

Commit

Permalink
Fixes tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MincedCutlet committed Jan 28, 2020
1 parent 006898c commit 0edad38
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/utils/TimeSlots.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { getSlotMetrics } from '../../src/utils/TimeSlots'
import * as dates from '../../src/utils/dates'

describe('getSlotMetrics', () => {
const min = dates.startOf(new Date(), 'day')
const max = dates.endOf(new Date(), 'day')
const min = dates.startOf(new Date(2018, 0, 29, 0, 0, 0), 'day')
const max = dates.endOf(new Date(2018, 0, 29, 59, 59, 59), 'day')
const slotMetrics = getSlotMetrics({ min, max, step: 60, timeslots: 1 })
test('getSlotMetrics.closestSlotToPosition: always returns timeslot if valid percentage is given', () => {
expect(slotMetrics.closestSlotToPosition(0)).toBeDefined()
Expand All @@ -24,9 +24,9 @@ describe('getSlotMetrics', () => {
})

describe('getRange', () => {
const min = dates.startOf(new Date(), 'day')
const max = dates.endOf(new Date(), 'day')
const slotMetrics = getSlotMetrics({ min, max, step: 60, timeslots: 1 })
const min = dates.startOf(new Date(2018, 0, 29, 0, 0, 0), 'day')
const max = dates.endOf(new Date(2018, 0, 29, 24, 0, 0), 'day')
const slotMetrics = getSlotMetrics({ min, max, step: 15, timeslots: 1 })

test('getRange: 15 minute start of day appointment stays within calendar', () => {
let range = slotMetrics.getRange(
Expand Down

0 comments on commit 0edad38

Please sign in to comment.