From fbf2617fa0059e4d9431153f79845f4bccafac1f Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Thu, 25 Nov 2021 18:40:17 +0300 Subject: [PATCH] Update tv.trueid.net.test.js --- sites/tv.trueid.net/tv.trueid.net.test.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/sites/tv.trueid.net/tv.trueid.net.test.js b/sites/tv.trueid.net/tv.trueid.net.test.js index b99a270f..a69285e4 100644 --- a/sites/tv.trueid.net/tv.trueid.net.test.js +++ b/sites/tv.trueid.net/tv.trueid.net.test.js @@ -1,4 +1,4 @@ -// npx epg-grabber --config=sites/tv.trueid.net/tv.trueid.net.config.js --channels=sites/tv.trueid.net/tv.trueid.net_th.channels.xml --days=1 --output=guide.xml +// NODE_OPTIONS=--insecure-http-parser npx epg-grabber --config=sites/tv.trueid.net/tv.trueid.net.config.js --channels=sites/tv.trueid.net/tv.trueid.net_th.channels.xml --output=guide.xml --timeout=30000 --days=2 const { parser, url, logo } = require('./tv.trueid.net.config.js') const dayjs = require('dayjs') @@ -13,7 +13,7 @@ const channel = { xmltv_id: 'NFLNBATV.us', name: 'NFL & NBA TV' } -const content = `` +const content = `` it('can generate valid url', () => { const result = url({ channel, date }) @@ -28,11 +28,15 @@ it('can get logo url', () => { }) it('can parse response', () => { - const result = parser({ date, channel, content }) + const result = parser({ date, channel, content }).map(p => { + p.start = p.start.toJSON() + p.stop = p.stop.toJSON() + return p + }) expect(result).toMatchObject([ { - start: dayjs.utc('Thu, 28 Oct 2021 19:00:00 GMT'), - stop: dayjs.utc('Thu, 28 Oct 2021 21:00:00 GMT'), + start: '2021-10-28T19:00:00.000Z', + stop: '2021-10-28T21:00:00.000Z', title: 'NBA 2021/22', icon: 'https://epgthumb.dmpcdn.com/thumbnail_large/t513/20211029/20211029_020000.jpg' }