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

isMoment.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 isMoment from '../../src/plugin/isMoment'
dayjs.extend(isMoment)
beforeEach(() => { MockDate.set(new Date())})
afterEach(() => { MockDate.reset()})
it('IsLeapYear', () => { expect(dayjs.isMoment(dayjs())).toBe(true) expect(dayjs.isMoment(new Date())).toBe(false)})
dayjs

Version Info

Tagged at
a year ago