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; }