Skip to content
Merged
Show file tree
Hide file tree
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
Prev Previous commit
Improve error message for when maxWorkers is undefined
  • Loading branch information
nicolasiensen committed Oct 3, 2017
commit 2ff0f6b4fad6ecc89c176a7aa586de00b434c403
2 changes: 1 addition & 1 deletion packages/jest-cli/src/__tests__/cli/args.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ describe('check', () => {
it('raises an exception if maxWorkers is specified with no number', () => {
const argv: Argv = {maxWorkers: undefined};
expect(() => check(argv)).toThrow(
'The --maxWorkers option requires a number to be specified',
'The --maxWorkers (-w) option requires a number to be specified',
);
});

Expand Down
4 changes: 2 additions & 2 deletions packages/jest-cli/src/cli/args.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ export const check = (argv: Argv) => {

if (argv.hasOwnProperty('maxWorkers') && argv.maxWorkers === undefined) {
throw new Error(
'The --maxWorkers option requires a number to be specified.\n' +
'The --maxWorkers (-w) option requires a number to be specified.\n' +
'Example usage: jest --maxWorkers 2\n' +
'Or did you mean --watch ?',
'Or did you mean --watch?',
);
}

Expand Down