fixed the url function: reversed the diff direction; removed unnecessary extra minute from currDate

adjusted the test as well
This commit is contained in:
marek 2022-10-21 01:42:45 -04:00
parent 2f1ebda654
commit 6145a69945
2 changed files with 3 additions and 3 deletions

View file

@ -24,7 +24,7 @@ it('can generate valid url', () => {
})
it('can generate valid url for next day', () => {
MockDate.set(dayjs.utc('2021-11-25', 'YYYY-MM-DD').startOf('d'))
MockDate.set(dayjs.utc('2021-11-23', 'YYYY-MM-DD').startOf('d'))
expect(url({ channel, date })).toBe(
'https://programtv.onet.pl/program-tv/13th-street-250?dzien=1'
)