Update update-guides.test.js

This commit is contained in:
Aleksandr Statciuk 2022-01-31 05:32:21 +03:00
parent 34eef8f525
commit b45d914727
4 changed files with 14 additions and 7 deletions

View 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"}

View 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"}

View file

@ -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}

View file

@ -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) {