mirror of
https://github.com/comatory/fb2iCal
synced 2025-06-05 22:09:25 +02:00
add specs for parser utils
This commit is contained in:
14
mocks/dayjs.mock.js
Normal file
14
mocks/dayjs.mock.js
Normal file
@ -0,0 +1,14 @@
|
||||
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 }
|
Reference in New Issue
Block a user