Jest - Debug usage with WebStorm
See original GitHub issueWebstorm natively supports debugging tests (single test, multiple tests, whole file) with jest. But since this plugin requires to invoke tests using serverless-bundle
script, it’s somewhat incompatible with WebStorm’s native way of running tests and results with “Jest encountered an unexpected token” because it can’t understand ES6 import/export (it’s not running jest through webpack/babel)
What’s the recommended way to configure WebStorm with serverless-bundle? Or is there any known workaround? (I believe it’s possible to configure webstorm to run tests through serverless-bundle, but haven’t figured out how yet)
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Run/Debug Configuration: Jest - WebStorm - JetBrains
Launch Web Browser: select this option to have a browser started. · Run External tool: select to run an external application. · Run...
Read more >Testing and Debugging Happily with WebStorm, Jest and ...
Problem #1: Why can't you launch my tests??? ... ... herein follow the Necromicon of usage info for the react-scripts command ... ......
Read more >Debug Jest in a NRWL/nx project with webstorm - Yonatan Kra
Open your NRWL/nx project in webstorm (we have to start with some common ground here…) · Make sure you have a lib or...
Read more >Running jest tests directly in Intellij Idea/WebStorm?
I just setup Webstorm 2017.1.4 to natively use Jest for debugging. Click on the Configurations drop down, select Edit Configurations, click the green...
Read more >Configuring and debugging Typescript Jest tests in WebStorm
Almost there! All that's left to do is add the Run Configuration to WebStorm, in the top right corner or in Run ->...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@Vadorequest, @patrykkrawczyk: The way I worked around this was to:
jest@24.9.0
as adevDependency
to my own project’spackage.json
(optional I think, but otherwise WebStorm wouldn’t display the inline test/debug icon in the editor)jest.config.js
file in your project’s root that loads theserverless-bundle
config:serverless-bundle
, e.g.:{your-project-root}/node_modules/serverless-bundle/node_modules/jest
That seemed to do the trick for me.
any progress on this? running tests with
serverless-bundle test
in terminal seems medieval