Update rev.bs

This commit is contained in:
Aleksandr Statciuk 2022-02-01 05:31:20 +03:00
parent 2b3008a0e0
commit a8458ac8db
3 changed files with 183 additions and 191 deletions

View file

@ -1,7 +1,7 @@
// node ./scripts/channels.js --config=./sites/rev.bs/rev.bs.config.js --output=./sites/rev.bs/rev.bs_bs.channels.xml
// npx epg-grabber --config=sites/rev.bs/rev.bs.config.js --channels=sites/rev.bs/rev.bs_bs.channels.xml --output=.gh-pages/guides/bs/rev.bs.epg.xml --days=2
const { parser, url, logo } = require('./rev.bs.config.js')
const { parser, url } = require('./rev.bs.config.js')
const axios = require('axios')
const dayjs = require('dayjs')
const utc = require('dayjs/plugin/utc')
@ -15,8 +15,7 @@ jest.mock('axios')
const date = dayjs.utc('2021-11-21', 'YYYY-MM-DD').startOf('d')
const channel = {
site_id: '206',
xmltv_id: 'WTVJ.us',
logo: 'https://zap2it.tmsimg.com/assets/s28717_h5_aa.png'
xmltv_id: 'WTVJ.us'
}
it('can generate valid url', () => {
@ -25,10 +24,6 @@ it('can generate valid url', () => {
)
})
it('can generate valid logo url', () => {
expect(logo({ channel })).toBe('https://zap2it.tmsimg.com/assets/s28717_h5_aa.png')
})
it('can parse response', done => {
axios.get.mockImplementation(url => {
if (url === 'https://www.rev.bs/wp-content/uploads/tv-guide/2021-11-21_1.json') {