1
0
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:
Ondřej Synáček
2020-07-15 20:46:14 +02:00
parent 48e012bbc0
commit db0ee12c4f
2 changed files with 63 additions and 0 deletions

14
mocks/dayjs.mock.js Normal file
View 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 }