forked from GitHubMirrors/silverbullet-icalendar
conductor(checkpoint): Checkpoint end of Phase 3
This commit is contained in:
@@ -243,3 +243,26 @@ Deno.test("expandRecurrences - object rrule with byday", () => {
|
|||||||
assertEquals(results[0].recurrent, true);
|
assertEquals(results[0].recurrent, true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
Deno.test("expandRecurrences - composite object rrule", () => {
|
||||||
|
const now = new Date();
|
||||||
|
const start = new Date(now.getTime() - 10 * 86400000);
|
||||||
|
const startStr = localDateString(start);
|
||||||
|
const untilDate = new Date(now.getTime() + 10 * 86400000);
|
||||||
|
|
||||||
|
const icsEvent = {
|
||||||
|
summary: "Composite RRULE Event",
|
||||||
|
start: startStr,
|
||||||
|
rrule: {
|
||||||
|
frequency: "WEEKLY",
|
||||||
|
until: { date: untilDate },
|
||||||
|
byday: [{ day: "MO" }, { day: "WE" }, { day: "FR" }]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const results = expandRecurrences(icsEvent, 30);
|
||||||
|
// Should successfully expand multiple days per week until the date
|
||||||
|
assert(results.length > 1);
|
||||||
|
assertEquals(results[0].recurrent, true);
|
||||||
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user