Replaced LF endings with CRLF

This commit is contained in:
freearhey
2025-07-29 05:28:59 +03:00
parent 651850370a
commit ca219de82d
86 changed files with 6821 additions and 6821 deletions

View File

@@ -1,43 +1,43 @@
const { url, parser } = require('./taiwanplus.com.config.js')
const fs = require('fs')
const path = require('path')
const dayjs = require('dayjs')
const utc = require('dayjs/plugin/utc')
dayjs.extend(utc)
const date = dayjs.utc('2023-08-20', 'YYYY-MM-DD').startOf('d')
const channel = {
site_id: '#',
xmltv_id: 'TaiwanPlusTV.tw',
lang: 'en',
logo: 'https://i.imgur.com/SfcZyqm.png'
}
it('can generate valid url', () => {
expect(url({ channel, date })).toBe('https://www.taiwanplus.com/api/video/live/schedule/0')
})
it('can parse response', () => {
const content = fs.readFileSync(path.resolve(__dirname, '__data__/content.json'))
const results = parser({ content, date })
expect(results).toMatchObject([
{
title: 'Master Class',
start: dayjs.utc('2023/08/20 00:00', 'YYYY/MM/DD HH:mm'),
stop: dayjs.utc('2023/08/21 00:00', 'YYYY/MM/DD HH:mm'),
description:
'From blockchain to Buddha statues, Taiwans culture is a kaleidoscope of old and new just waiting to be discovered.',
image: 'https://prod-img.taiwanplus.com/live-schedule/Single/S30668_20230810104937.webp',
category: 'TaiwanPlus ✕ Discovery',
rating: '0+'
}
])
})
it('can handle empty guide', () => {
const results = parser({ content: '' })
expect(results).toMatchObject([])
})
const { url, parser } = require('./taiwanplus.com.config.js')
const fs = require('fs')
const path = require('path')
const dayjs = require('dayjs')
const utc = require('dayjs/plugin/utc')
dayjs.extend(utc)
const date = dayjs.utc('2023-08-20', 'YYYY-MM-DD').startOf('d')
const channel = {
site_id: '#',
xmltv_id: 'TaiwanPlusTV.tw',
lang: 'en',
logo: 'https://i.imgur.com/SfcZyqm.png'
}
it('can generate valid url', () => {
expect(url({ channel, date })).toBe('https://www.taiwanplus.com/api/video/live/schedule/0')
})
it('can parse response', () => {
const content = fs.readFileSync(path.resolve(__dirname, '__data__/content.json'))
const results = parser({ content, date })
expect(results).toMatchObject([
{
title: 'Master Class',
start: dayjs.utc('2023/08/20 00:00', 'YYYY/MM/DD HH:mm'),
stop: dayjs.utc('2023/08/21 00:00', 'YYYY/MM/DD HH:mm'),
description:
'From blockchain to Buddha statues, Taiwans culture is a kaleidoscope of old and new just waiting to be discovered.',
image: 'https://prod-img.taiwanplus.com/live-schedule/Single/S30668_20230810104937.webp',
category: 'TaiwanPlus ✕ Discovery',
rating: '0+'
}
])
})
it('can handle empty guide', () => {
const results = parser({ content: '' })
expect(results).toMatchObject([])
})