vscode-jest not supporting projects with Babel
See original GitHub issueEnvironment
-
node -v
: 10.10.0 -
npm -v
: 6.1.0 -
npm ls jest
23.6.0 -
Operating system: Windows
Prerequisite
- are you able to run jest test from command line? yes
- how do yo run your tests from command line? yarn test or npx jest Working fine. It’s also working fine from VS Code terminal.
Steps to Reproduce
Just create any project that using Babel and jest and try to open it in VS Code with this plugin.
Relevant Debug Info
FAIL tests/myCode-test.js
● Test suite failed to run
Jest encountered an unexpected token
I tried to turn on debugging by creating my project/.vscode/settings.json:
{ “jest.debugMode”: true }
But there’s no debug messages in the DevTools console so I can’t get more information.
I tried to add echo in the jest command line itself. I found out that it’s not executing the project’s jest but some other jest I don’t know from where. Maybe this plugin has it’s own special version of jest.
Expected Behavior
To work like from the command line.
Actual Behavior
FAIL tests/myCode-test.js
● Test suite failed to run
Jest encountered an unexpected token
Issue Analytics
- State:
- Created 5 years ago
- Reactions:7
- Comments:6
Top Results From Across the Web
Jest + Babel in VS Code debugger causes breakpoints to move
I am trying to debug a simple project using babel, jest, and vs code. When I set a breakpoint and then start debugging,...
Read more >Troubleshooting - Jest
Try using the debugging support built into Node. Place a debugger; statement in any of your tests, and then, in your project's directory, ......
Read more >vscode-jest-runner - Visual Studio Marketplace
Extension for Visual Studio Code - Simple way to run or debug a single (or multiple) tests from context-menu.
Read more >Switching a Jest Project from Babel to SWC - Goldblog
Configure SWC to not compile away generators or async/await code. Generators and async/await have been fully supported in Node for years, ...
Read more >Tooling - styled-components
Tooling. Babel Plugin. This plugin adds support for server-side rendering, minification of styles, and a ...
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 FreeTop 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
Top GitHub Comments
yes, in your
project-root > .vscode > settings.json
:Can you post the instructions how to do that?
When I run yarn test everything working fine. I just need a way to make the vscode jest plugin to do the same. The “troubleshooting” section saying something that it’s possible but not how to do it.
Is it “jest.pathToJest”: “yarn test --” ???