mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 00:50:09 -04:00
Update update-guides.test.js
This commit is contained in:
parent
34eef8f525
commit
b45d914727
4 changed files with 14 additions and 7 deletions
1
tests/__data__/expected/logs/errors/ru/yandex.ru.log
Normal file
1
tests/__data__/expected/logs/errors/ru/yandex.ru.log
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"xmltv_id":"Perviykanal.ru","site":"yandex.ru","site_id":"1","lang":"ru","date":"2022-01-21T00:00:00Z","error":"Some error"}
|
1
tests/__data__/expected/logs/errors/us/directv.com.log
Normal file
1
tests/__data__/expected/logs/errors/us/directv.com.log
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"xmltv_id":"BravoEast.us","site":"directv.com","site_id":"237","lang":"en","date":"2022-01-21T00:00:00Z","error":"Invalid header value char"}
|
|
@ -1,6 +1,6 @@
|
||||||
{"group":"us/directv.com","count":1,"status":1}
|
{"group":"us/directv.com","count":0,"status":1}
|
||||||
{"group":"fr/chaines-tv.orange.fr","count":1,"status":0}
|
{"group":"fr/chaines-tv.orange.fr","count":1,"status":0}
|
||||||
{"group":"bh/chaines-tv.orange.fr","count":1,"status":0}
|
{"group":"bh/chaines-tv.orange.fr","count":1,"status":0}
|
||||||
{"group":"ge/magticom.ge","count":1,"status":0}
|
{"group":"ge/magticom.ge","count":0,"status":1}
|
||||||
{"group":"ru/yandex.ru","count":1,"status":1}
|
{"group":"ru/yandex.ru","count":0,"status":1}
|
||||||
{"group":"zw/dstv.com","count":1,"status":0}
|
{"group":"zw/dstv.com","count":1,"status":0}
|
||||||
|
|
|
@ -41,11 +41,16 @@ it('can create guides.log', () => {
|
||||||
expect(output).toBe(expected)
|
expect(output).toBe(expected)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('can create errors.log', () => {
|
it('can log errors', () => {
|
||||||
const output = content('tests/__data__/output/logs/errors.log')
|
const output1 = content('tests/__data__/output/logs/errors/ru/yandex.ru.log')
|
||||||
const expected = content('tests/__data__/expected/logs/errors.log')
|
const expected1 = content('tests/__data__/expected/logs/errors/ru/yandex.ru.log')
|
||||||
|
|
||||||
expect(output).toBe(expected)
|
expect(output1).toBe(expected1)
|
||||||
|
|
||||||
|
const output2 = content('tests/__data__/output/logs/errors/us/directv.com.log')
|
||||||
|
const expected2 = content('tests/__data__/expected/logs/errors/us/directv.com.log')
|
||||||
|
|
||||||
|
expect(output2).toBe(expected2)
|
||||||
})
|
})
|
||||||
|
|
||||||
function content(filepath) {
|
function content(filepath) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue