Merge branch 'master' into add-prettier-config

This commit is contained in:
Aleksandr Statciuk 2022-12-29 23:36:43 +03:00
commit 268d150cc5
3 changed files with 7 additions and 7 deletions

View file

@ -1,4 +1,4 @@
{"channel":{"lang":"en","id":"CNNInternationalEurope.us","name":"CNN International","logo":"https://upload.wikimedia.org/wikipedia/commons/thumb/6/66/CNN_International_logo.svg/512px-CNN_International_logo.svg.png","url":"https://example.com","site_id":"140","site":"example.com"},"date":"2022-02-03T00:00:00.000Z","configPath":"tests/__data__/input/sites/example.com.config.js","groups":["ca-en/example.com"],"error":null,"cluster_id":1,"_id":"vOpwztzvJ5pFSVws"}
{"channel":{"lang":"en","id":"CNNInternationalEurope.us","name":"CNN International","logo":"https://upload.wikimedia.org/wikipedia/commons/thumb/6/66/CNN_International_logo.svg/512px-CNN_International_logo.svg.png","url":"https://example.com","site_id":"140","site":"example.com"},"date":"2022-02-04T00:00:00.000Z","configPath":"tests/__data__/input/sites/example.com.config.js","groups":["ca-en/example.com"],"error":null,"cluster_id":1,"_id":"sP2A0zQSOoVg0BS1"}
{"channel":{"lang":"ru","id":"CNNInternationalEurope.us","name":"CNN International","logo":"https://upload.wikimedia.org/wikipedia/commons/thumb/6/66/CNN_International_logo.svg/512px-CNN_International_logo.svg.png","url":"https://example.com","site_id":"140","site":"example.com"},"date":"2022-02-03T00:00:00.000Z","configPath":"tests/__data__/input/sites/example.com.config.js","groups":["ca-ru/example.com"],"error":null,"cluster_id":1,"_id":"vOpwztzvJ5pFSVwB"}
{"channel":{"lang":"ru","id":"CNNInternationalEurope.us","name":"CNN International","logo":"https://upload.wikimedia.org/wikipedia/commons/thumb/6/66/CNN_International_logo.svg/512px-CNN_International_logo.svg.png","url":"https://example.com","site_id":"140","site":"example.com"},"date":"2022-02-04T00:00:00.000Z","configPath":"tests/__data__/input/sites/example.com.config.js","groups":["ca-ru/example.com"],"error":null,"cluster_id":1,"_id":"sP2A0zQSOoVg0BSB"}
{"channel":{"id":"CNNInternationalEurope.us","name":"CNN International","site":"example.com","site_id":"140","lang":"en","logo":"https://i.imgur.com/2BXCg0x.jpg","url":"https://example.com"},"date":"2022-12-29T00:00:00.000Z","configPath":"tests/__data__/input/sites/example.com.config.js","groups":["ca-en/example.com"],"error":null,"cluster_id":1,"_id":"z8NuUrwLzFmvwVaN"}
{"channel":{"id":"CNNInternationalEurope.us","name":"CNN International","site":"example.com","site_id":"140","lang":"en","logo":"https://i.imgur.com/2BXCg0x.jpg","url":"https://example.com"},"date":"2022-12-30T00:00:00.000Z","configPath":"tests/__data__/input/sites/example.com.config.js","groups":["ca-en/example.com"],"error":null,"cluster_id":1,"_id":"VbOAfybHJmi9fVhI"}
{"channel":{"id":"CNNInternationalEurope.us","name":"CNN International","site":"example.com","site_id":"140","lang":"ru","logo":"https://i.imgur.com/2BXCg0x.jpg","url":"https://example.com"},"date":"2022-12-29T00:00:00.000Z","configPath":"tests/__data__/input/sites/example.com.config.js","groups":["ca-ru/example.com"],"error":null,"cluster_id":1,"_id":"Gv8kvgVzGQH345DI"}
{"channel":{"id":"CNNInternationalEurope.us","name":"CNN International","site":"example.com","site_id":"140","lang":"ru","logo":"https://i.imgur.com/2BXCg0x.jpg","url":"https://example.com"},"date":"2022-12-30T00:00:00.000Z","configPath":"tests/__data__/input/sites/example.com.config.js","groups":["ca-ru/example.com"],"error":null,"cluster_id":1,"_id":"qk1kIFkVtbBXLsIp"}

View file

@ -3,7 +3,7 @@ const { execSync } = require('child_process')
it('will show a message if the file contains a duplicate', () => {
try {
const stdout = execSync(
'npm run channels:validate -- tests/__data__/input/sites/duplicate.channels.xml',
'DATA_DIR=tests/__data__/input/data npm run channels:validate -- tests/__data__/input/sites/duplicate.channels.xml',
{
encoding: 'utf8'
}
@ -27,7 +27,7 @@ it('will show a message if the file contains a duplicate', () => {
it('will show a message if the file contains a channel with wrong xmltv_id', () => {
try {
const stdout = execSync(
'npm run channels:validate -- tests/__data__/input/sites/wrong_xmltv_id.channels.xml',
'DATA_DIR=tests/__data__/input/data npm run channels:validate -- tests/__data__/input/sites/wrong_xmltv_id.channels.xml',
{
encoding: 'utf8'
}

View file

@ -6,7 +6,7 @@ beforeEach(() => {
fs.emptyDirSync('tests/__data__/output')
const stdout = execSync(
'DB_DIR=tests/__data__/output/database CHANNELS_PATH=tests/__data__/input/sites/example.com_ca-*.channels.xml npm run queue:create -- --max-clusters=1 --days=2',
'DB_DIR=tests/__data__/output/database CHANNELS_PATH=tests/__data__/input/sites/example.com_ca-*.channels.xml DATA_DIR=tests/__data__/input/data npm run queue:create -- --max-clusters=1 --days=2',
{ encoding: 'utf8' }
)
})