deno.land / x / dayjs@v1.11.5 / test / plugin / isLeapYear.test.js

isLeapYear.test.js
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import MockDate from 'mockdate'import dayjs from '../../src'import isLeapYear from '../../src/plugin/isLeapYear'
dayjs.extend(isLeapYear)
beforeEach(() => { MockDate.set(new Date())})
afterEach(() => { MockDate.reset()})
it('IsLeapYear', () => { expect(dayjs('20000101').isLeapYear()).toBe(true) expect(dayjs('2100-01-01').isLeapYear()).toBe(false)})
dayjs

Version Info

Tagged at
a year ago