-
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix test for whole day event cross over dst change (#345)
- Loading branch information
Showing
4 changed files
with
80 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
BEGIN:VCALENDAR | ||
BEGIN:VEVENT | ||
DTSTART;TZID=Europe/Germany:20241022T230000 | ||
DTEND;TZID=TZID=Europe/Germany:20241023T000000 | ||
RRULE:FREQ=DAILY;WKST=MO;COUNT=4 | ||
DTSTAMP:20241009T153220Z | ||
UID:[email protected] | ||
CREATED:20241009T153058Z | ||
LAST-MODIFIED:20241009T153205Z | ||
SEQUENCE:0 | ||
STATUS:CONFIRMED | ||
SUMMARY:TestCal_AllDayRepeatingEvent | ||
TRANSP:TRANSPARENT | ||
END:VEVENT | ||
END:VCALENDAR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1161,6 +1161,41 @@ vows | |
} | ||
} | ||
} | ||
}, | ||
'with germany_at_end_of_day_repeating.ics': { | ||
topic() { | ||
return ical.parseFile('./test/germany_at_end_of_day_repeating.ics'); | ||
}, | ||
checkEnd: { | ||
topic(events) { | ||
return _.select(_.values(events), x => { | ||
return x.uid === '[email protected]'; | ||
})[0]; | ||
}, | ||
'task completed'(task) { | ||
assert.equal(task.start.toDateString(), new Date(2024, 9, 22, 23, 0, 0).toDateString()); | ||
} | ||
} | ||
}, | ||
'with whole_day_moved_over_dst_change_berlin.ics': { | ||
topic() { | ||
return ical.parseFile('./test/whole_day_moved_over_dst_change_berlin.ics'); | ||
}, | ||
checkEnd: { | ||
topic(events) { | ||
return _.select(_.values(events), x => { | ||
return x.uid === '[email protected]'; | ||
})[0].recurrences['2024-10-28']; | ||
}, | ||
'topic recurrence': { | ||
'datetype is date'(task) { | ||
assert.equal(task.datetype, 'date'); | ||
}, | ||
'moved event starts 30 Oct 2024'(now) { | ||
assert.equal(now.start.toDateString(), new Date(2024, 9, 30, 0, 0, 0).toDateString()); | ||
} | ||
} | ||
} | ||
} | ||
}) | ||
.export(module); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
BEGIN:VCALENDAR | ||
BEGIN:VEVENT | ||
DTSTART;VALUE=DATE:20241027 | ||
DTEND;VALUE=DATE:20241028 | ||
RRULE:FREQ=DAILY;WKST=SU;COUNT=3 | ||
DTSTAMP:20241020T152634Z | ||
UID:[email protected] | ||
CREATED:20241020T152434Z | ||
LAST-MODIFIED:20241020T152536Z | ||
SEQUENCE:1 | ||
STATUS:CONFIRMED | ||
SUMMARY:test whole day moved | ||
TRANSP:TRANSPARENT | ||
END:VEVENT | ||
BEGIN:VEVENT | ||
DTSTART;VALUE=DATE:20241030 | ||
DTEND;VALUE=DATE:20241031 | ||
DTSTAMP:20241020T152634Z | ||
UID:[email protected] | ||
RECURRENCE-ID;VALUE=DATE:20241028 | ||
CREATED:20241020T152434Z | ||
LAST-MODIFIED:20241020T152536Z | ||
SEQUENCE:2 | ||
STATUS:CONFIRMED | ||
SUMMARY:test whole day moved | ||
TRANSP:TRANSPARENT | ||
END:VEVENT | ||
END:VCALENDAR |