Update bin.test.js

This commit is contained in:
Aleksandr Statciuk 2022-01-16 17:34:21 +03:00
parent 9a4b18143d
commit fbddeef541
1 changed files with 3 additions and 6 deletions

View File

@ -1,8 +1,6 @@
const { execSync } = require('child_process')
const pwd = `${__dirname}/..`
import axios from 'axios'
jest.mock('axios')
const pwd = `${__dirname}/..`
function stdoutResultTester(stdout) {
return [`Finish`].every(val => {
@ -22,8 +20,6 @@ it('can load config', () => {
})
it('can load mini config', () => {
axios.mockImplementation(() => Promise.resolve({ data: '' }))
const result = execSync(
`node ${pwd}/bin/epg-grabber.js \
--config=tests/input/mini.config.js \
@ -32,7 +28,8 @@ it('can load mini config', () => {
--lang=fr \
--days=3 \
--delay=0 \
--timeout=10000`,
--debug \
--timeout=1`,
{
encoding: 'utf8'
}