Update utils.test.js

This commit is contained in:
Aleksandr Statciuk 2021-08-23 13:45:57 +03:00
parent a42bcf35b9
commit 93baf248f7
1 changed files with 16 additions and 0 deletions

View File

@ -134,3 +134,19 @@ it('can build request async', async () => {
})
})
})
it('can load logo async', async () => {
const config = utils.loadConfig('./tests/input/async.config.js')
return utils.loadLogo({}, config).then(logo => {
expect(logo).toBe('http://example.com/logos/1TV.png?x=шеллы&sid=777')
})
})
it('can parse programs async', async () => {
const config = utils.loadConfig('./tests/input/async.config.js')
return utils
.parsePrograms({ channel: { xmltv_id: '1tv', lang: 'en' } }, config)
.then(programs => {
expect(programs.length).toBe(0)
})
})