From feba263119aa4cca5e1302ef05eb1abd85414496 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=C3=A1n=20de=20B=C3=BArca?= Date: Thu, 18 Apr 2024 10:07:43 -0700 Subject: [PATCH] Add jsdoc and cover iterator "completed" value --- lib/ical/recur_iterator.js | 7 +++++++ test/recur_iterator_test.js | 1 + 2 files changed, 8 insertions(+) diff --git a/lib/ical/recur_iterator.js b/lib/ical/recur_iterator.js index 518a1a5e..3cecbb19 100644 --- a/lib/ical/recur_iterator.js +++ b/lib/ical/recur_iterator.js @@ -1385,6 +1385,13 @@ class RecurIterator { } } +/** + * An error indicating that a recurrence rule is invalid and produces no + * occurrences. + * + * @extends {Error} + * @class + */ class InvalidRecurrenceRuleError extends Error { constructor() { super("Recurrence rule has no valid occurrences"); diff --git a/test/recur_iterator_test.js b/test/recur_iterator_test.js index a870d0fd..34ada1af 100644 --- a/test/recur_iterator_test.js +++ b/test/recur_iterator_test.js @@ -155,6 +155,7 @@ suite('recur_iterator', function() { if (options.noInstance) { assert.equal(iterator.next(), null); + assert.ok(iterator.completed); return; }