-
-
Notifications
You must be signed in to change notification settings - Fork 27k
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
npm test fails if the project doesn't have git #5210
Comments
To reproduce:
|
This is by design: jestjs/jest#4737 (comment) Maybe it makes sense to fall back to So the short of it is that, yes, you should probably detect missing VCS and in that case use Although I'd personally be open to printing something like |
What I really want is something like There's no need to shame users into adding a VCS in tiny projects. At this point "watch changed" would bring them zero benefit because they're basically just learning programming. It's just confusing to scare them with this message. IMO there should be a seamless mode where it "tries its best" at watching changed, but if it can't, falls back to "watching all". We can implement it ourselves for sure but I'm worrying about diverging logic, and also about unnecessary bloat in ejected scripts, duplicating what Jest is already doing. |
Yeah, that was the pitch in jestjs/jest#4737, but it was changed to throw as it was deemed (I think) to be more confusing to change a user's config from under their feet than asking them to be explicit. |
/cc @aaronabramov |
Well, that's true when user specifies the config. But in our case we specify the config, and for us Jest config is an implementation detail that now leaks to the user. |
I agree. From what I've been looking at, it seems to be that there was a regression introduced between I'm sure @cpojer might provide better insights, but here are my initial thoughts.
|
This sounds great! For now I'm adding a detection workaround. |
Note that, unless somebody (probably meaning @mjesun) wants to do some cherry-picking, the next release of Jest will be a major, so any change we make to Jest will most likely not be something CRA can pick up before its next major. So a workaround in CRA makes sense regardless |
Apparently Jest did this. Oops!
The text was updated successfully, but these errors were encountered: