From 82559cedf2a077dc758fa7383f71fcfb72105802 Mon Sep 17 00:00:00 2001 From: freearhey <7253922+freearhey@users.noreply.github.com> Date: Tue, 14 Jan 2025 19:33:50 +0300 Subject: [PATCH] Delete hd-plus.de.test.js --- sites/hd-plus.de/hd-plus.de.test.js | 54 ----------------------------- 1 file changed, 54 deletions(-) delete mode 100644 sites/hd-plus.de/hd-plus.de.test.js diff --git a/sites/hd-plus.de/hd-plus.de.test.js b/sites/hd-plus.de/hd-plus.de.test.js deleted file mode 100644 index ff3a4c51..00000000 --- a/sites/hd-plus.de/hd-plus.de.test.js +++ /dev/null @@ -1,54 +0,0 @@ -const { parser, url } = require('./hd-plus.de.config.js') -const dayjs = require('dayjs') -const utc = require('dayjs/plugin/utc') -const customParseFormat = require('dayjs/plugin/customParseFormat') -dayjs.extend(customParseFormat) -dayjs.extend(utc) - -const date = dayjs.utc('2021-11-25', 'YYYY-MM-DD').startOf('d') -const channel = { - site_id: '1-2-3-tv-hd', - xmltv_id: '123tv.de' -} -const content = - '
1-2-3.tv HD

1-2-3.tv HD

Titel Ausstrahlungszeit
Ihre Lieblingsuhren Do 25.11 00:00
Ihre Lieblingsuhren Do 25.11 01:00
Flash DealsDo 25.11 06:00
' - -it('can generate valid url', () => { - const today = dayjs.utc().startOf('d') - expect(url({ channel, date: today })).toBe('https://www.hd-plus.de/epg/channel/1-2-3-tv-hd?d=0') -}) - -it('can parse response', () => { - const result = parser({ content, channel, date }).map(p => { - p.start = p.start.toJSON() - p.stop = p.stop.toJSON() - return p - }) - - expect(result).toMatchObject([ - { - start: '2021-11-24T23:00:00.000Z', - stop: '2021-11-25T00:00:00.000Z', - title: 'Ihre Lieblingsuhren' - }, - { - start: '2021-11-25T00:00:00.000Z', - stop: '2021-11-25T05:00:00.000Z', - title: 'Ihre Lieblingsuhren' - }, - { - start: '2021-11-25T05:00:00.000Z', - stop: '2021-11-25T06:00:00.000Z', - title: 'Flash Deals' - } - ]) -}) - -it('can handle empty guide', () => { - const result = parser({ - date, - channel, - content: '' - }) - expect(result).toMatchObject([]) -})