Skip to content

Commit

Permalink
test: added failing schedule().next() test #14
Browse files Browse the repository at this point in the history
  • Loading branch information
yrambler2001 committed Jul 28, 2021
1 parent e8d16f3 commit fe30d9d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/core/schedule-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ describe('Schedule', function () {
const s = { schedules: [{ Y: [2017] }] };
should.equal(schedule(s).next(1, d, e), later.NEVER);
});

it('should return next schedule if previous schedule has next date later.NEVER', function () {
const d = new Date('2013-03-21T00:00:05Z');
const s = { schedules: [{ Y: [2012] }, { Y: [2017] }] };
schedule(s).next(1, d).should.eql(new Date('2017-01-01T00:00:00Z'));
});
});

describe('prev', function () {
Expand Down

0 comments on commit fe30d9d

Please sign in to comment.