From f5e9a2815d91d5717f6c8adc14a0f1bbc7552201 Mon Sep 17 00:00:00 2001 From: freearhey <7253922+freearhey@users.noreply.github.com> Date: Sun, 9 Jul 2023 16:49:43 +0300 Subject: [PATCH] Create example_channels.config.js --- .../__data__/input/example_channels.config.js | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 tests/__data__/input/example_channels.config.js diff --git a/tests/__data__/input/example_channels.config.js b/tests/__data__/input/example_channels.config.js new file mode 100644 index 0000000..1219457 --- /dev/null +++ b/tests/__data__/input/example_channels.config.js @@ -0,0 +1,32 @@ +const dayjs = require('dayjs') +const utc = require('dayjs/plugin/utc') + +dayjs.extend(utc) + +module.exports = { + site: 'example.com', + days: 2, + channels: ['example.channels.xml', 'example_2.channels.xml'], + output: 'tests/__data__/output/guide.xml', + url: () => 'http://example.com/20210319/1tv.json', + request: { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + Cookie: 'abc=123' + }, + data() { + return { accountID: '123' } + } + }, + parser: () => { + return [ + { + title: 'Program1', + start: 1640995200000, + stop: 1640998800000 + } + ] + }, + logo: () => 'http://example.com/logos/1TV.png?x=шеллы&sid=777' +}