Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('converts correctly', function() {
let calendar = new Calendar(document.createElement('div'), {
plugins: [ DayGridPlugin ],
defaultTimedEventDuration: '05:00',
defaultAllDayEventDuration: { days: 3 }
})
// hacky way to have a duration parsed
let timedDuration = toDuration(calendar.defaultTimedEventDuration)
let allDayDuration = toDuration(calendar.defaultAllDayEventDuration)
expect(timedDuration.asHours()).toBe(5)
expect(allDayDuration.asDays()).toBe(3)
})
it('converts correctly', function() {
let calendar = new Calendar(document.createElement('div'), {
plugins: [ DayGridPlugin ],
defaultTimedEventDuration: '05:00',
defaultAllDayEventDuration: { days: 3 }
})
// hacky way to have a duration parsed
let timedDuration = toDuration(calendar.defaultTimedEventDuration)
let allDayDuration = toDuration(calendar.defaultAllDayEventDuration)
expect(timedDuration.asHours()).toBe(5)
expect(allDayDuration.asDays()).toBe(3)
})