From 93baf248f736cd2cd87784d98a6107b5dbbe3244 Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Mon, 23 Aug 2021 13:45:57 +0300 Subject: [PATCH] Update utils.test.js --- tests/utils.test.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/utils.test.js b/tests/utils.test.js index edc7474..df69795 100644 --- a/tests/utils.test.js +++ b/tests/utils.test.js @@ -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) + }) +})