From 18c3c8c2231c71bed731e987f015b064a2dba4da Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Sat, 21 Aug 2021 19:11:04 +0300 Subject: [PATCH] Create async.config.js --- tests/input/async.config.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tests/input/async.config.js diff --git a/tests/input/async.config.js b/tests/input/async.config.js new file mode 100644 index 0000000..60c461d --- /dev/null +++ b/tests/input/async.config.js @@ -0,0 +1,21 @@ +module.exports = { + site: 'example.com', + channels: 'example.com.channels.xml', + url() { + return Promise.resolve('http://example.com/20210319/1tv.json') + }, + request: { + method: 'POST', + headers() { + return Promise.resolve({ + 'Content-Type': 'application/json', + Cookie: 'abc=123' + }) + }, + data() { + return Promise.resolve({ accountID: '123' }) + } + }, + parser: () => [], + logo: () => 'http://example.com/logos/1TV.png?x=шеллы&sid=777' +}