-
-
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
[FeatureRequest] Allow jest to be ran without watch mode. #6284
Comments
+1 for this feature, especially considering #2393 (when in watch mode on linux, it fails with too many file watchers) The fix for this is in |
I think we need to address this, as it is raised often. I'd be open to a PR adding @rally25rs, I'm not sure what feature you're referring to - can you provide a link? I use it with watch-mode on Linux (Ubuntu) and it works well locally. |
@mrmckeb #2393 and jestjs/jest#3254 are the issues I'm trying to resolve. In a very simple new react app (crate-react-app plus react-router and react-bootstrap; and the project has 2 views in it so far just to test out react-router):
the issue seems to be that In the linked issue there is a comment that this is fixed in |
We need to bump to |
It seems like the only way to get jest to run in without watch mode is to run it with
--coverage
or set the environment variable toCI=true
. Runningnpm test -- --watch=false
(and similar) does not work.My use case for this feature is debugging within VS Code through react scripts.
The following launch configuration was given in the create-react-app docs
This somewhat works but it does not break at breakpoints because (I think) react-scripts is runs jest in watch mode. Adding
"env": { "CI": "true" },
allows breakpoints to work again because it disables watch mode.I'm fine with this workaround but I'd happier with a
--watch=false
,--no-watch
,--single
, or similar flag.Thanks for the amazing tool and I apologize if I missed anything!
Somewhat related issues:
#784
#1137
The text was updated successfully, but these errors were encountered: