Facebook-Events-iCal-Converter/mocks/dayjs.mock.js

15 lines
294 B
JavaScript
Raw Normal View History

2020-07-15 20:46:14 +02:00
const dayjs = jest.requireActual('dayjs')
let mockedDay = null
const mockDayJs = (args, options) => {
return mockedDay || dayjs(args, options)
}
const setMockedDay = (args, options) => {
mockedDay = dayjs(args, options)
return mockedDay
}
module.exports = { mockDayJs, setMockedDay }