From 0e2e5c9699026e5462a9b7212eae9267abd45734 Mon Sep 17 00:00:00 2001 From: sstent Date: Sat, 21 Feb 2026 13:56:02 -0800 Subject: [PATCH] test: add variation test for WORKWEEKSTART --- tests/reach_variations_test.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/reach_variations_test.ts b/tests/reach_variations_test.ts index ce89a04..e5e69fe 100644 --- a/tests/reach_variations_test.ts +++ b/tests/reach_variations_test.ts @@ -56,6 +56,23 @@ Deno.test("Variation: Recurring Weekly (Multi-day: MO,TU,WE,TH,FR)", () => { assert(results.some(r => r.start.includes("2026-01-20"))); // Tuesday }); +Deno.test("Variation: Recurring with WORKWEEKSTART (Outlook style)", () => { + const icsEvent = { + summary: "Outlook Style Meeting", + start: "2026-01-20T08:30:00", + rrule: { + frequency: "WEEKLY", + interval: 1, + byday: "TU", + workweekstart: "MO" + } + }; + + const results = expandRecurrences(icsEvent, 30, TEST_NOW); + assert(results.length > 0); + assert(results[0].start.includes("2026-01-20")); +}); + Deno.test("Variation: Recurring with EXDATE (Exclusion)", () => { const icsEvent = { summary: "HPE-Veeam check-in",