mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-09 16:40:07 -04:00
Update foxsports.com.au.test.js
This commit is contained in:
parent
3fc8c8e41d
commit
9a94a3ec4d
1 changed files with 31 additions and 27 deletions
|
@ -1,3 +1,4 @@
|
|||
// npx epg-grabber --config=sites/foxsports.com.au/foxsports.com.au.config.js --channels=sites/foxsports.com.au/foxsports.com.au_au.channels.xml --output=guide.xml --days=2
|
||||
|
||||
const { parser, url } = require('./foxsports.com.au.config.js')
|
||||
const dayjs = require('dayjs')
|
||||
|
@ -8,7 +9,7 @@ const date = dayjs.utc('2022-12-14', 'YYYY-MM-DD').startOf('d')
|
|||
const channel = {
|
||||
site_id: '2',
|
||||
xmltv_id: 'FoxLeague.au'
|
||||
}
|
||||
}
|
||||
it('can generate valid url', () => {
|
||||
expect(url({ date })).toBe(
|
||||
'https://tvguide.foxsports.com.au/granite-api/programmes.json?from=2022-12-14&to=2022-12-15'
|
||||
|
@ -37,8 +38,11 @@ it('can parse response', () => {
|
|||
})
|
||||
|
||||
it('can handle empty guide', () => {
|
||||
const result = parser({
|
||||
const result = parser(
|
||||
{
|
||||
content: `{"channel-programme":[]}`
|
||||
}, channel)
|
||||
},
|
||||
channel
|
||||
)
|
||||
expect(result).toMatchObject([])
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue