Skip to content

Commit

Permalink
test: add CLI timeout (#1727)
Browse files Browse the repository at this point in the history
  • Loading branch information
erezrokah authored Jan 13, 2021
1 parent 305f8f4 commit bc76973
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/utils/call-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@ const execa = require('execa')

const cliPath = require('./cli-path')

const CLI_TIMEOUT = 3e5

const callCli = async function (args, execOptions) {
const { stdout } = await execa(cliPath, args, { windowsHide: true, windowsVerbatimArguments: true, ...execOptions })
const { stdout } = await execa(cliPath, args, {
timeout: CLI_TIMEOUT,
...execOptions,
})
return stdout
}

Expand Down

0 comments on commit bc76973

Please sign in to comment.