Skip to main content
Module

x/dayjs/test/constructor.test.js

⏰ Day.js 2kB immutable date-time library alternative to Moment.js with the same modern API
Go to Latest
File
import MockDate from 'mockdate'import dayjs from '../src'
beforeEach(() => { MockDate.set(new Date())})
afterEach(() => { MockDate.reset()})
it('supports instanceof dayjs', () => { expect(dayjs() instanceof dayjs).toBeTruthy()})
it('does not break isDayjs', () => { expect(dayjs.isDayjs(dayjs())).toBeTruthy()})