[
{ "name": "calendar days from a Wednesday failure", "args": ["2026-09-23", [1, 3, 5, 7], false, []], "expect": ["2026-09-24", "2026-09-26", "2026-09-28", "2026-09-30"] },
{ "name": "the same policy in business days steps over the weekend", "args": ["2026-09-23", [1, 3, 5, 7], true, []], "expect": ["2026-09-24", "2026-09-28", "2026-09-30", "2026-10-02"] },
{ "name": "business days over Christmas skip the bank holidays too", "args": ["2026-12-23", [1, 3, 5], true, ["2026-12-25", "2026-12-28", "2027-01-01"]], "expect": ["2026-12-24", "2026-12-30", "2027-01-04"] },
{ "name": "in calendar mode holidays are ignored", "args": ["2026-12-23", [1, 3, 5], false, ["2026-12-25", "2026-12-28", "2027-01-01"]], "expect": ["2026-12-24", "2026-12-26", "2026-12-28"] },
{ "name": "calendar retries across a leap day", "args": ["2024-02-27", [1, 2, 3], false, []], "expect": ["2024-02-28", "2024-02-29", "2024-03-01"] },
{ "name": "a Saturday failure retried one business day later is retried on Monday", "args": ["2026-09-26", [1], true, []], "expect": ["2026-09-28"] },
{ "name": "offsets count from the failure, not from the previous retry", "args": ["2026-01-01", [3, 5, 7], false, []], "expect": ["2026-01-04", "2026-01-06", "2026-01-08"] },
{ "name": "a long policy crosses the year end", "args": ["2026-12-15", [7, 14, 21], false, []], "expect": ["2026-12-22", "2026-12-29", "2027-01-05"] },
{ "name": "no retries configured is an empty schedule", "args": ["2026-09-23", [], true, []], "expect": [] },
{ "name": "an offset of zero is an error", "args": ["2026-09-23", [0, 3], false, []], "expectError": "retry offsets must be whole days of 1 or more" },
{ "name": "repeated offsets are an error", "args": ["2026-09-23", [3, 3], false, []], "expectError": "retry offsets must be strictly increasing" },
{ "name": "decreasing offsets are an error", "args": ["2026-09-23", [5, 3], false, []], "expectError": "retry offsets must be strictly increasing" },
{ "name": "an impossible failure date is an error even with no retries", "args": ["2026-02-30", [], false, []], "expectError": "is not a real calendar date" },
{ "name": "a malformed holiday is an error in business-day mode", "args": ["2026-09-23", [1], true, ["25/12/2026"]], "expectError": "is not an ISO date" }
]