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

chore: tweak wording when using conflicting CLI arguments #13901

Merged
merged 1 commit into from Mar 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 5 additions & 7 deletions packages/jest-cli/src/args.ts
Expand Up @@ -15,8 +15,7 @@ export function check(argv: Config.Argv): true {
Object.prototype.hasOwnProperty.call(argv, 'maxWorkers')
) {
throw new Error(
'Both --runInBand and --maxWorkers were specified, but these two ' +
'options do not make sense together. Which is it?',
'Both --runInBand and --maxWorkers were specified, only one is allowed.',
);
}

Expand All @@ -28,17 +27,16 @@ export function check(argv: Config.Argv): true {
]) {
if (argv[key] && argv.watchAll) {
throw new Error(
`Both --${key} and --watchAll were specified, but these two ` +
'options do not make sense together. Try the --watch option which ' +
'reruns only tests related to changed files.',
`Both --${key} and --watchAll were specified, but cannot be used ` +
'together. Try the --watch option which reruns only tests ' +
'related to changed files.',
);
}
}

if (argv.onlyFailures && argv.watchAll) {
throw new Error(
'Both --onlyFailures and --watchAll were specified, but these two ' +
'options do not make sense together.',
'Both --onlyFailures and --watchAll were specified, only one is allowed.',
);
}

Expand Down