Update bin.test.js
This commit is contained in:
parent
9a4b18143d
commit
fbddeef541
|
@ -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'
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue