Skip to content

Commit 679b5ad

Browse files
authored
chore: tweak wording when using conflicting CLI arguments (#13901)
1 parent 4156f86 commit 679b5ad

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

packages/jest-cli/src/args.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ export function check(argv: Config.Argv): true {
1515
Object.prototype.hasOwnProperty.call(argv, 'maxWorkers')
1616
) {
1717
throw new Error(
18-
'Both --runInBand and --maxWorkers were specified, but these two ' +
19-
'options do not make sense together. Which is it?',
18+
'Both --runInBand and --maxWorkers were specified, only one is allowed.',
2019
);
2120
}
2221

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

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

0 commit comments

Comments
 (0)