-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Unhelpful error message when jest --watch is run outside of git repository #4419
Comments
That's a bug! cc @rogeliog @aaronabramov |
I've run into the same issue with the follow configuration:
I did a little playing with versions to deduce where the problem may have started. Downgrading to Jest v21.0.0 leaves me with the same problem, and the same workaround as above solves the issue. I'm able to run |
I've run into the same issue with the follow configuration: Jest v21.0.1 running: jest --watch |
I'm also able to repro it, I think it was introduced here |
Same issue here Jest 21.0.1 |
cc: @aaronabramov |
Downgrading back to jest cli version 20.0.4 seems to be a temporary solution:
|
@15Dkatz thx, that helped |
@rogeliog it seems like it happens because and if Can we just remove this assignment from watch mode? is this config option is used for anything else then getting changed files from hg/git? |
Thanks for the point out there @aaronabramov. I ended up changing to --watchAll which helps to circumvent this issue. |
My configuration is:
2 possibles solutions (that I found):
|
it works when i use --watchAll, but when i played around with filters (pattern mode) and after that i clicked "c" to clear filters i had the same error again. |
* Use watchAll fallback for non git/hq projects (#4419) * use stdout instead of console * print error when no hq/git project instead of changing arguments * add integration tests for watch arg requires hq or git
Same issue: Jest: 21.2.1 Adding a git repo to project folder is a fix. |
Fixed in #4737 (not released) |
* Use watchAll fallback for non git/hq projects (#4419) * use stdout instead of console * print error when no hq/git project instead of changing arguments * add integration tests for watch arg requires hq or git * check watch flag and repos to find out if watch is not possible * tests show error message when no vcs and watch is set * Use watchAll fallback for non git/hq projects (#4419) * use stdout instead of console * check watch flag and repos to find out if watch is not possible * tests show error message when no vcs and watch is set * make watch check earlier to improve performance when watch is false
…rn and npm being in the same place...
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. |
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
When
jest --watch
is executed inside a non-git folder the following exception is raised:If the current behavior is a bug, please provide the steps to reproduce and either a repl.it demo through https://repl.it/languages/jest or a minimal repository on GitHub that we can
yarn install
andyarn test
..git
folder is not present (removed)What is the expected behavior?
A more helpful message as to why jest failed.
Please provide your exact Jest configuration and mention your Jest, node, yarn/npm version and operating system.
The text was updated successfully, but these errors were encountered: