mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 17:10:07 -04:00
Update tvtv.us.test.js
This commit is contained in:
parent
9c95901acf
commit
0e3b9deb5e
1 changed files with 2 additions and 7 deletions
|
@ -1,7 +1,7 @@
|
|||
// node ./scripts/commands/parse-channels.js --config=./sites/tvtv.us/tvtv.us.config.js --output=./sites/tvtv.us/tvtv.us_ca.channels.xml --set=country:ca
|
||||
// npx epg-grabber --config=sites/tvtv.us/tvtv.us.config.js --channels=sites/tvtv.us/tvtv.us_ca-nb.channels.xml --output=guide.xml --days=2
|
||||
|
||||
const { parser, url, logo } = require('./tvtv.us.config.js')
|
||||
const { parser, url } = require('./tvtv.us.config.js')
|
||||
const dayjs = require('dayjs')
|
||||
const utc = require('dayjs/plugin/utc')
|
||||
const customParseFormat = require('dayjs/plugin/customParseFormat')
|
||||
|
@ -11,8 +11,7 @@ dayjs.extend(utc)
|
|||
const date = dayjs.utc('2022-01-17', 'YYYY-MM-DD').startOf('d')
|
||||
const channel = {
|
||||
site_id: '62670',
|
||||
xmltv_id: 'AMITV.ca',
|
||||
logo: 'https://cdn.tvpassport.com/image/station/100x100/src.png'
|
||||
xmltv_id: 'AMITV.ca'
|
||||
}
|
||||
|
||||
it('can generate valid url', () => {
|
||||
|
@ -21,10 +20,6 @@ it('can generate valid url', () => {
|
|||
)
|
||||
})
|
||||
|
||||
it('can get logo url', () => {
|
||||
expect(logo({ channel })).toBe('https://cdn.tvpassport.com/image/station/100x100/src.png')
|
||||
})
|
||||
|
||||
it('can parse response', () => {
|
||||
const content = `[{"startTime":"2022-01-20T00:00Z","endTime":"2022-01-20T00:30Z","duration":30,"qualifiers":["CC","DVS"],"program":{"tmsId":"EP031727440006","rootId":"16777148","seriesId":"16640522","subType":"Series","title":"Reflect and Renew With Kevin Naidoo","episodeTitle":"Empowerment","releaseYear":2019,"releaseDate":"2019-04-20","origAirDate":"2019-04-20","titleLang":"en","descriptionLang":"en","entityType":"Episode","genres":["Health"],"longDescription":"Kevin demonstrates a meditation and yoga practice to reclaim his courage and confidence.","shortDescription":"Kevin demonstrates a meditation and yoga practice to reclaim his courage and confidence.","episodeNum":6,"seasonNum":1,"ratings":[{"body":"Régie du cinéma","code":"G"},{"body":"USA Parental Rating","code":"TVG"},{"body":"Canadian Parental Rating","code":"G"}],"preferredImage":{"width":"240","height":"360","uri":"assets/p16640522_b_v9_aa.jpg?w=240&h=360","category":"Banner-L2","text":"yes","primary":"true","tier":"Series"}},"station":{"stationId":"62670","callSign":"AMITV","videoQuality":{"signalType":"Digital","videoType":"SDTV"},"preferredImage":{"width":"360","height":"270","uri":"assets/s62670_ll_h15_ab.png?w=360&h=270","category":"Logo","primary":"true"}}},{"startTime":"2022-01-20T00:30Z","endTime":"2022-01-20T01:00Z","duration":30,"qualifiers":["CC","DVS"],"program":{"tmsId":"EP018574900040","rootId":"12448902","seriesId":"10464580","subType":"Series","title":"Four Senses","episodeTitle":"Sizzled & Seared","releaseYear":2016,"releaseDate":"2016-01-14","origAirDate":"2016-01-14","titleLang":"en","descriptionLang":"en","entityType":"Episode","genres":["House/garden"],"longDescription":"Everything is sizzled and seared as chef Corbin Tomaszeski joins Christine and Carl in the kitchen.","shortDescription":"Everything is sizzled and seared as chef Corbin Tomaszeski joins Christine and Carl in the kitchen.","topCast":["Carl Heinrich","Christine Ha"],"ratings":[{"body":"Canadian Parental Rating","code":"G"},{"body":"USA Parental Rating","code":"TVG"},{"body":"Régie du cinéma","code":"G"}],"preferredImage":{"width":"240","height":"360","uri":"assets/p10464580_b_v7_aa.jpg?w=240&h=360","category":"Banner-L1","text":"yes","primary":"true","tier":"Series"}},"station":{"stationId":"62670","callSign":"AMITV","videoQuality":{"signalType":"Digital","videoType":"SDTV"},"preferredImage":{"width":"360","height":"270","uri":"assets/s62670_ll_h15_ab.png?w=360&h=270","category":"Logo","primary":"true"}}}]`
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue