blob: ecb0f7724fc25b45468f05758b130d938a970bde [file] [log] [blame]
const cli = require('./cli')
const sinon = require('sinon')
sinon.stub(console, 'error')
// set jest timeout to very long, because these take a while
beforeAll(() => jest.setTimeout(90 * 1000))
// reset back
afterAll(() => jest.setTimeout(5 * 1000))
test('cli should be a function', async () => {
expect(typeof cli).toBe('function')
})
test('try to start cli', async () => {
const testArgv = [
'node',
'weex',
'-f',
'-v'
]
const result = await cli(testArgv)
expect(console.error.called).toBeFalsy()
})