Skip to content

Commit

Permalink
test: update test
Browse files Browse the repository at this point in the history
  • Loading branch information
iamkun committed Apr 20, 2018
1 parent 5a0a6ff commit af83c26
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/query.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ afterEach(() => {
MockDate.reset()
})

const testArr = [dayjs, moment]

it('IsLeapYear', () => {
expect(dayjs('20000101').isLeapYear()).toBe(true)
expect(dayjs('21000101').isLeapYear()).toBe(false)
})

it('Is Before Is After Is Same', () => {
[moment, dayjs].forEach((instance) => {
testArr.forEach((instance) => {
const dayA = instance()
const dayB = dayA.clone().add(1, 'day')
const dayC = dayA.clone().subtract(1, 'day')
Expand Down

0 comments on commit af83c26

Please sign in to comment.