Fix linter issues in sites/
This commit is contained in:
1 parent
d6d20b6413
commit
5df982bb7c
129 files changed
+3316
-3226
No files matched your search
@@ -18,7 +18,7 @@ const channel = {
|
||||
xmltv_id: 'NickJr.tr'
|
||||
}
|
||||
|
||||
axios.get.mockImplementation((url, opts) => {
|
||||
axios.get.mockImplementation(url => {
|
||||
if (url === 'https://tvplus.com.tr/canli-tv/yayin-akisi') {
|
||||
return Promise.resolve({
|
||||
data: fs.readFileSync(path.join(__dirname, '__data__', 'build.html')).toString()
|
||||
@@ -27,17 +27,18 @@ axios.get.mockImplementation((url, opts) => {
|
||||
})
|
||||
|
||||
it('can generate valid url', async () => {
|
||||
expect(await url({ channel })).toBe('https://tvplus.com.tr/_next/data/kUzvz_bbQJNaShlFUkrR3/tr/canli-tv/yayin-akisi/nick-jr--4353.json?title=nick-jr--4353')
|
||||
expect(await url({ channel })).toBe(
|
||||
'https://tvplus.com.tr/_next/data/kUzvz_bbQJNaShlFUkrR3/tr/canli-tv/yayin-akisi/nick-jr--4353.json?title=nick-jr--4353'
|
||||
)
|
||||
})
|
||||
|
||||
it('can parse response', () => {
|
||||
const content = fs.readFileSync(path.join(__dirname, '__data__', 'content.json'))
|
||||
const results = parser({ date, channel, content })
|
||||
.map(p => {
|
||||
p.start = p.start.toJSON()
|
||||
p.stop = p.stop.toJSON()
|
||||
return p
|
||||
})
|
||||
const results = parser({ date, channel, content }).map(p => {
|
||||
p.start = p.start.toJSON()
|
||||
p.stop = p.stop.toJSON()
|
||||
return p
|
||||
})
|
||||
|
||||
expect(results.length).toBe(88)
|
||||
expect(results[0]).toMatchObject({
|
||||
@@ -45,7 +46,7 @@ it('can parse response', () => {
|
||||
stop: '2024-12-14T21:20:00.000Z',
|
||||
title: 'Camgöz (2020)',
|
||||
description:
|
||||
'Max\'in Camgöz adında yarı köpek balığı yarı köpek eşsiz bir evcil havyanı vardır. İlk başlarda Camgöz\'ü saklamaya çalışsa da Sisli Pınarlar\'da, en iyi arkadaşlar, meraklı komşular ve hatta Max\'in ailesi bile yaramaz yeni arkadaşını fark edecektir.',
|
||||
"Max'in Camgöz adında yarı köpek balığı yarı köpek eşsiz bir evcil havyanı vardır. İlk başlarda Camgöz'ü saklamaya çalışsa da Sisli Pınarlar'da, en iyi arkadaşlar, meraklı komşular ve hatta Max'in ailesi bile yaramaz yeni arkadaşını fark edecektir.",
|
||||
image:
|
||||
'https://gbzeottvsc01.tvplus.com.tr:33207/CPS/images/universal/film/program/202412/20241209/21/2126356250845eb88428_0_XL.jpg',
|
||||
category: 'Çocuk',
|
||||
|
||||
Reference in new issue
Block a user