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

[Feature] Do not allow passing w CLI flag without argument #4577

Closed
xixixao opened this issue Oct 1, 2017 · 2 comments
Closed

[Feature] Do not allow passing w CLI flag without argument #4577

xixixao opened this issue Oct 1, 2017 · 2 comments

Comments

@xixixao
Copy link
Contributor

xixixao commented Oct 1, 2017

jest -w will happily run, and I have no clue why watch mode isn't working - it's not working because -w is not for watch mode but for specifying number of workers. It should be easy to throw an error when I don't pass in the number of workers (bonus points for hinting at --watch flag).

@thymikee
Copy link
Collaborator

thymikee commented Oct 1, 2017

Sounds like a great idea! Would you like to contribute this change to Jest? :)

cpojer pushed a commit that referenced this issue Oct 3, 2017
…#4591)

* Check if the maxWorkers has a value and raises an exception otherwise

In this commit we are adding a new validation in the check method of the
jest-cli package, so we raise an exception if the user tries to run Jest
with undefined maxWorkers, e.g.

jest --maxWorkers

jest --maxWorkers 2

Some users were confusing -w as an alias to --watch, but in fact it is
an alias to --maxWorkers. This change will also make this distinction
clearer.

Fixes issue #4577

* Add expected exception message in the check method tests

* Improve error message for when maxWorkers is undefined
@cpojer cpojer closed this as completed Oct 3, 2017
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants