Skip to content

Commit

Permalink
Add test for #72
Browse files Browse the repository at this point in the history
  • Loading branch information
mcdado committed Jul 1, 2019
1 parent 5921959 commit 04b2da9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,13 @@ describe('Moment Business Days', function () {
expect(newBusinessDay.isValid()).to.be.false;
});
});
describe('On Thursday, January 3rd 2019', function () {
it('adds one business day, then converts to string with toISOString()', function (done) {
var newBusinessDay = moment('2019-01-03T12:00:00.000Z').businessAdd(1, 'days');
expect(newBusinessDay.toISOString()).to.eql('2019-01-04T12:00:00.000Z');
done();
});
});
describe('On Tuesday, November 3rd 2015', function () {
it('adds business days only, excluding weekends, even over 2 weeks', function (done) {
var newBusinessDay = moment('11-03-2015', 'MM-DD-YYYY').businessAdd(5);
Expand Down

0 comments on commit 04b2da9

Please sign in to comment.