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
+43 -43
View File
@@ -1,43 +1,43 @@
const { parser, url } = require('./foxsports.com.au.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('2022-12-14', 'YYYY-MM-DD').startOf('d')
const channel = {
site_id: '2',
xmltv_id: 'FoxLeague.au'
}
it('can generate valid url', () => {
expect(url({ date })).toBe(
'https://tvguide.foxsports.com.au/granite-api/programmes.json?from=2022-12-14&to=2022-12-15'
)
})
it('can parse response', () => {
const content = fs.readFileSync(path.resolve(__dirname, '__data__/content.json'))
const result = parser({ content, channel }).map(p => {
p.start = p.start.toJSON()
p.stop = p.stop.toJSON()
return p
})
expect(result).toMatchObject([
{
title: 'NRL',
sub_title: 'Eels v Titans',
description:
'The Eels and Titans have plenty of motivation this season after heartbreaking Finals losses in 2021. Parramatta has won their past five against Gold Coast.',
category: 'Rugby League',
start: '2022-12-13T13:00:00.000Z',
stop: '2022-12-13T14:00:00.000Z'
}
])
})
it('can handle empty guide', () => {
const result = parser({content: ''}, channel)
expect(result).toMatchObject([])
})
const { parser, url } = require('./foxsports.com.au.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('2022-12-14', 'YYYY-MM-DD').startOf('d')
const channel = {
site_id: '2',
xmltv_id: 'FoxLeague.au'
}
it('can generate valid url', () => {
expect(url({ date })).toBe(
'https://tvguide.foxsports.com.au/granite-api/programmes.json?from=2022-12-14&to=2022-12-15'
)
})
it('can parse response', () => {
const content = fs.readFileSync(path.resolve(__dirname, '__data__/content.json'))
const result = parser({ content, channel }).map(p => {
p.start = p.start.toJSON()
p.stop = p.stop.toJSON()
return p
})
expect(result).toMatchObject([
{
title: 'NRL',
sub_title: 'Eels v Titans',
description:
'The Eels and Titans have plenty of motivation this season after heartbreaking Finals losses in 2021. Parramatta has won their past five against Gold Coast.',
category: 'Rugby League',
start: '2022-12-13T13:00:00.000Z',
stop: '2022-12-13T14:00:00.000Z'
}
])
})
it('can handle empty guide', () => {
const result = parser({content: ''}, channel)
expect(result).toMatchObject([])
})