From b56edf7250cd85ceac1931ab37c4e4ac46258623 Mon Sep 17 00:00:00 2001 From: freearhey Date: Mon, 26 Apr 2021 15:47:12 +0300 Subject: [PATCH] Update utils.test.js --- tests/utils.test.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/utils.test.js b/tests/utils.test.js index 59615b1..349010c 100644 --- a/tests/utils.test.js +++ b/tests/utils.test.js @@ -23,6 +23,9 @@ it('can load valid config.js', () => { expect(typeof config.request.data).toEqual('function') expect(typeof config.url).toEqual('function') expect(typeof config.logo).toEqual('function') + expect(config.request.data()).toEqual({ accountID: '123' }) + expect(config.url()).toEqual('http://example.com/20210319/1tv.json') + expect(config.logo()).toEqual('http://example.com/logos/1TV.png?x=шеллы&sid=777') }) it('can parse valid channels.xml', () => { @@ -55,14 +58,14 @@ it('can convert object to xmltv string', () => { start: '2021-03-19 06:00:00 +0000', stop: '2021-03-19 06:30:00 +0000', category: 'Test', - icon: 'https://example.com/images/Program1.png', + icon: 'https://example.com/images/Program1.png?x=шеллы&sid=777', channel: '1TV.com', lang: 'it' } ] const output = utils.convertToXMLTV({ channels, programs }) expect(output).toBe( - '\r\n1 TV\r\n2 TV\r\nProgram 1Description for Program 1Test\r\n' + '\r\n1 TV\r\n2 TV\r\nProgram 1Description for Program 1Test\r\n' ) })