-
-
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
add support to webstorme #1871
Comments
cc @prigara, anything we can do on our side? |
This new run configuration for Jest can only run Jest directly. In create-react-app, unfortunately for WebStorm, Jest is run via a wrapper script |
Is there any reason WebStorm can't recognize |
At this specific moment it's implemented the way that it can only recognize and run Jest itself.
|
Thanks for looking into it. What config options does WebStorm need to pass? We could merge them on our side.
Sounds like a plan. 👍
I actually don't know. I haven't looked into Node debugging for a while because Jest was waiting for some Node bugfix which I don't know whether it landed or not. But if Jest supports it, so should we.
|
Since currently WebStorm integrates with jest via
In case of |
@shai32 please see my comment above - it's not possible to use WebStorm Jest run/debug configuration to run tests in the app created with creat-react-app. Please follow this issue for updates. |
@shai32 use the command line directly - there's an integrated terminal in the IDE. |
@prigara are you working for webStorm? |
@shai32 yes |
+1 |
Ah, it turned out there is no need to disable transforming/mocking IDE sources using |
Thanks @segrey |
@segrey maybe we need to add these to the docs |
@shai32 add the Jest entry point as a node debug config |
@shai32 Just as normal Jest run configuration, only specify |
Is it letting you debug in webstorme? |
@shai32 Does it work when tests are run in a terminal, outside IDE? |
@quantuminformation: yes it let me debug @segrey yes it does run in terminal, and it passes. |
|
@quantuminformation: did you set Jest Package to be react-scripts? |
opps I was a node config, thx it works now. |
@shai32 I couldn't reproduce the issue with setupTest.js (tried with |
@segrey so setupTest.js is actually running before your test? setupTest.js should be run without require it |
it's working! |
@shai32 With configuration |
@yonatanmn Sorry, not sure I can reproduce the problem from your description. Please file an issue in the https://youtrack.jetbrains.com/issues/WEB with an example project that allows to reproduce the issue. Thanks |
@segrey how do I configure "setupTestFrameworkScriptFile": "/setupTests.js"? |
@shai32 If I understood correctly, your configuration works in terminal (outside IDE) and fails in IDE. This is a bug, but I can't reproduce it. Thus, I'd like to hear more input from you to be able to reproduce the issue. My configuration is simple: // package.json
{
"jest": {
"setupTestFrameworkScriptFile": "<rootDir>/setupTests.js"
}
} |
@segrey it now works, when I run in terminal, there is no need to add "setupTestFrameworkScriptFile" to package.json. |
@shai32 Thanks, I see. Unfortunately, I couldn't setup such a configuration that can be run in terminal successfully, but fails in IDE. Could you file an issue in https://youtrack.jetbrains.com/issues/WEB with details allowing to reproduce it? An example project would be just great. |
@segrey I don't think it need any fix, it was a configuration issue. |
@shai32 You could be right as it depends on how configuration looks like. E.g. IDE needs configuration duplication if jests tests are running as a npm script, in this case all jest parameters specified in the script should be copied in "Jest options" field in Jest RC. Filing an issue makes sense If you are not OK with current behavior. |
This warning is caused by using old V8 debugger protocol ( @shai32 Probably, it's worth to file a new issue to discuss a separate topic. |
Yea, probably going to close this as it's unrelated. |
webStorm support native jest

but when I run yarn test, I see all the tests in the terminal.
Is there any way to integrate the testing with webStorm?
it's much more convenient to use the webStorm Gui to see the errors
The text was updated successfully, but these errors were encountered: