refactor: event instances
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -66,6 +66,21 @@ describe('occurrence index', () => {
|
||||
expect(occurrencesForDay(index, new Date(2026, 5, 21))).toHaveLength(0)
|
||||
})
|
||||
|
||||
it('treats UTC timestamps on timeless events as floating calendar dates', () => {
|
||||
const allDay = eventEntity(
|
||||
'utc-all-day',
|
||||
'2025-03-27T00:00:00+00:00',
|
||||
'2025-03-28T00:00:00+00:00',
|
||||
true,
|
||||
)
|
||||
const index = buildOccurrenceIndex([allDay])
|
||||
|
||||
expect(occurrencesForDay(index, new Date(2025, 2, 26))).toHaveLength(0)
|
||||
expect(occurrencesForDay(index, new Date(2025, 2, 27))).toHaveLength(1)
|
||||
expect(occurrencesForDay(index, new Date(2025, 2, 28))).toHaveLength(0)
|
||||
expect(new Date(index.sorted[0].startMs).getHours()).toBe(0)
|
||||
})
|
||||
|
||||
it('retrieves overlapping occurrences without duplicates', () => {
|
||||
const spanning = eventEntity(
|
||||
'spanning',
|
||||
|
||||
Reference in New Issue
Block a user