mirror of
https://github.com/iptv-org/epg
synced 2026-03-22 03:41:02 -04:00
Update tests for musor.tv
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -8,20 +8,20 @@ const customParseFormat = require('dayjs/plugin/customParseFormat')
|
||||
dayjs.extend(customParseFormat)
|
||||
dayjs.extend(utc)
|
||||
|
||||
const date = dayjs.utc('2022-11-19', 'YYYY-MM-DD').startOf('d')
|
||||
const date = dayjs.utc('2025-10-11', 'YYYY-MM-DD').startOf('d')
|
||||
const channel = {
|
||||
site_id: 'HATOS_CSATORNA',
|
||||
xmltv_id: 'Hatoscsatorna.hu'
|
||||
site_id: 'MAGYAR_MOZI_TV',
|
||||
xmltv_id: 'MagyarMoziTV.hu',
|
||||
}
|
||||
|
||||
it('can generate valid url', () => {
|
||||
expect(url({ channel, date })).toBe('https://musor.tv/napi/tvmusor/HATOS_CSATORNA/2022.11.19')
|
||||
expect(url({ channel, date })).toBe('https://musor.tv/napi/tvmusor/MAGYAR_MOZI_TV/2025.10.11')
|
||||
})
|
||||
|
||||
it('can generate valid url for today', () => {
|
||||
const today = dayjs.utc().startOf('d')
|
||||
|
||||
expect(url({ channel, date: today })).toBe('https://musor.tv/mai/tvmusor/HATOS_CSATORNA')
|
||||
expect(url({ channel, date: today })).toBe('https://musor.tv/mai/tvmusor/MAGYAR_MOZI_TV')
|
||||
})
|
||||
|
||||
it('can parse response', () => {
|
||||
@@ -33,18 +33,17 @@ it('can parse response', () => {
|
||||
})
|
||||
|
||||
expect(results[0]).toMatchObject({
|
||||
start: '2022-11-19T23:00:00.000Z',
|
||||
stop: '2022-11-19T23:30:00.000Z',
|
||||
title: 'Egészségtér',
|
||||
description:
|
||||
'Egészségtér címmel új természetgyógyászattal foglalkozó magazinműsor indult hetente fél órás időtartamban a hatoscsatornán. A műsor derűs, objektív hangvételével és szakmailag magas színvonalú ismeretterjesztő jellegével az e'
|
||||
start: '2025-10-10T23:05:00.000Z',
|
||||
stop: '2025-10-11T00:50:00.000Z',
|
||||
title: 'A 25. év - Három rohadék rockcsempész (Tankcsapda road movie)',
|
||||
description: 'Lévai Balázs több mint egy éven át forgatott a Tankcsapdával.'
|
||||
})
|
||||
|
||||
expect(results[1]).toMatchObject({
|
||||
start: '2022-11-19T23:30:00.000Z',
|
||||
stop: '2022-11-20T00:00:00.000Z',
|
||||
title: 'Tradíció Klipek',
|
||||
description: 'Tradíció Klipek Birinyi József néprajzi, vallási, népzenei, népszokás filmjeiből.'
|
||||
start: '2025-10-11T00:50:00.000Z',
|
||||
stop: '2025-10-11T01:45:00.000Z',
|
||||
title: 'Megbélyegzetten - 1968',
|
||||
description: 'Néhány tinédzser diák, egy csalinak szánt újságcikk nyomán levelet írt Ausztriába 1968-ban.'
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user