Skip to content

Commit

Permalink
Tevet edge case tests
Browse files Browse the repository at this point in the history
  • Loading branch information
oprogramador committed Dec 30, 2021
1 parent 28dfc44 commit ccb49c0
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/DateFn.mocha.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,23 @@ describe('#DateFn', function () {
assert.deepStrictEqual(res, [])
})

it('No Tevet 19 in gregorian year 2024', function () {
const fn = new DateFn('19 Tevet')
const res = fn.inYear(2024).get()
assert.deepStrictEqual(res, [])
})

it('Tevet 20 in gregorian year 2024', function () {
const fn = new DateFn('20 Tevet')
const res = fn.inYear(2024).get()
const exp = [{
date: '2024-01-01 00:00:00 -0600',
end: 'mon 2024-01-01 18:00',
start: 'sun 2023-12-31 18:00'
}]
assert.deepStrictEqual(fixResult(res), exp)
})

it('6 Adar 5779', function () {
const fn = new DateFn('6 Adar 5779')
const res = fn.inYear(2019).get()
Expand Down

0 comments on commit ccb49c0

Please sign in to comment.