mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 09:00:07 -04:00
Update rtp.pt.test.js
This commit is contained in:
parent
23bda5aeeb
commit
792e41d208
1 changed files with 9 additions and 9 deletions
|
@ -12,13 +12,13 @@ dayjs.extend(utc)
|
||||||
|
|
||||||
const date = dayjs.utc('2022-12-02', 'YYYY-MM-DD').startOf('d')
|
const date = dayjs.utc('2022-12-02', 'YYYY-MM-DD').startOf('d')
|
||||||
const channel = {
|
const channel = {
|
||||||
site_id: '1',
|
site_id: '4',
|
||||||
xmltv_id: 'RTP1.pt'
|
xmltv_id: 'RTPMadeira.pt'
|
||||||
}
|
}
|
||||||
|
|
||||||
it('can generate valid url', () => {
|
it('can generate valid url', () => {
|
||||||
expect(url({ channel, date })).toBe(
|
expect(url({ channel, date })).toBe(
|
||||||
'https://www.rtp.pt/EPG/json/rtp-channels-page/list-grid/tv/1/2-12-2022'
|
'https://www.rtp.pt/EPG/json/rtp-channels-page/list-grid/tv/4/2-12-2022'
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -30,12 +30,12 @@ it('can parse response', () => {
|
||||||
return p
|
return p
|
||||||
})
|
})
|
||||||
|
|
||||||
expect(results[0]).toMatchObject({
|
expect(results[9]).toMatchObject({
|
||||||
start: '2022-12-02T06:30:00.000Z',
|
start: '2022-12-02T23:30:00.000Z',
|
||||||
stop: '2022-12-02T10:00:00.000Z',
|
stop: '2022-12-03T00:00:00.000Z',
|
||||||
title: 'Bom Dia Portugal',
|
title: 'Telejornal Madeira',
|
||||||
description: 'E porque é de manhã que começa o dia, então inicie-o na nossa companhia!',
|
description: 'Informação de proximidade. De confiança!',
|
||||||
icon: 'https://cdn-images.rtp.pt/EPG/imagens/38084_57380_28384.png?w=384&h=216'
|
icon: 'https://cdn-images.rtp.pt/EPG/imagens/15790_43438_8820.png?w=384&h=216'
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue