Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add CLI timeout #1727

Merged
merged 2 commits into from
Jan 13, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion tests/utils/call-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,15 @@ 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, {
windowsHide: true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already the default value.
Note: windowsHide is a tricky option which has pros and cons. We probably want to keep the default value here and let Execa decides what the best value for it is.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed in 130ee48

windowsVerbatimArguments: true,
Copy link
Contributor

@ehmicky ehmicky Jan 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this needed? Would the default behavior might be better at handling Windows?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't think it is. Removed in 130ee48

timeout: CLI_TIMEOUT,
...execOptions,
})
return stdout
}

Expand Down