mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-11 17:40:07 -04:00
Added test command
This commit is contained in:
parent
59fb0cd560
commit
aeda504d61
1 changed files with 27 additions and 22 deletions
|
@ -1,3 +1,5 @@
|
|||
// npx epg-grabber --config=sites/rtmklik.rtm.gov.my/rtmklik.rtm.gov.my.config.js --channels=sites/rtmklik.rtm.gov.my/rtmklik.rtm.gov.my_my.channels.xml --output=guide.xml --days=2
|
||||
|
||||
const { parser, url } = require('./rtmklik.rtm.gov.my.config.js')
|
||||
const dayjs = require('dayjs')
|
||||
const utc = require('dayjs/plugin/utc')
|
||||
|
@ -12,7 +14,9 @@ const channel = {
|
|||
}
|
||||
|
||||
it('can generate valid url', () => {
|
||||
expect(url({ date, channel })).toBe('https://rtm.glueapi.io/v3/epg/2/ChannelSchedule?dateStart=2022-09-04&dateEnd=2022-09-04&timezone=0')
|
||||
expect(url({ date, channel })).toBe(
|
||||
'https://rtm.glueapi.io/v3/epg/2/ChannelSchedule?dateStart=2022-09-04&dateEnd=2022-09-04&timezone=0'
|
||||
)
|
||||
})
|
||||
|
||||
it('can parse response', () => {
|
||||
|
@ -29,7 +33,8 @@ it('can parse response', () => {
|
|||
start: '2022-09-04T19:00:00.000Z',
|
||||
stop: '2022-09-04T20:00:00.000Z',
|
||||
title: 'Hope Of Life',
|
||||
description: 'Kisah kehidupan 3 pakar bedah yang berbeza status dan latar belakang, namun mereka komited dengan kerjaya mereka sebagai doktor. Lakonan : Johnson Low, Elvis Chin, Mayjune Tan, Kelvin Liew, Jacky Kam dan Katrina Ho.'
|
||||
description:
|
||||
'Kisah kehidupan 3 pakar bedah yang berbeza status dan latar belakang, namun mereka komited dengan kerjaya mereka sebagai doktor. Lakonan : Johnson Low, Elvis Chin, Mayjune Tan, Kelvin Liew, Jacky Kam dan Katrina Ho.'
|
||||
}
|
||||
])
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue