Skip to content

Commit

Permalink
Fix addBusinessDay tests to use numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
Matsuuu committed May 20, 2020
1 parent fbb3053 commit bf93f84
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/addBusinessDays/test.js
Expand Up @@ -82,10 +82,10 @@ describe('addBusinessDays', function() {
assert.throws(addBusinessDays.bind(null, 1), TypeError)
})
it('starting from a weekend day should land on a weekday when reducing a divisible by 5', function() {
const substractResult = addBusinessDays(new Date('2019-08-18'), -5)
assert.deepEqual(substractResult, new Date('2019-08-12T00:00:00.000Z'))
const substractResult = addBusinessDays(new Date(2019, 7, 18), -5)
assert.deepEqual(substractResult, new Date(2019, 7, 12))

const addResult = addBusinessDays(new Date('2019-08-18'), 5)
assert.deepEqual(addResult, new Date('2019-08-23T00:00:00.000Z'))
const addResult = addBusinessDays(new Date(2019, 7, 18), 5)
assert.deepEqual(addResult, new Date(2019, 7, 23))
})
})

0 comments on commit bf93f84

Please sign in to comment.