Skip to content

Commit

Permalink
Add jsdoc and cover iterator "completed" value
Browse files Browse the repository at this point in the history
  • Loading branch information
leftmostcat committed Apr 18, 2024
1 parent 42e16f1 commit feba263
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/ical/recur_iterator.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
1 change: 1 addition & 0 deletions test/recur_iterator_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ suite('recur_iterator', function() {

if (options.noInstance) {
assert.equal(iterator.next(), null);
assert.ok(iterator.completed);
return;
}

Expand Down

0 comments on commit feba263

Please sign in to comment.