question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

vscode-jest stopping at launch of VSCode

See original GitHub issue

Environment

  1. node -v: v9.4.0
  2. npm -v: 6.3.0
  3. VSCode: 1.25.1
  4. Operating system: Windows 7 x64

Prerequisite

  • are you able to run jest test from command line? yes
  • how do yo run your tests from command line? yarn test

Steps to Reproduce

  1. Install Jest as dev-dependency
  2. Create jest.config.js with following: module.exports = { verbose: true, testURL: "http://localhost/", }

Expected Behavior

vscode-jest should work

Actual Behavior

After opening project with jest in VSCode:

  • vscode-jest stopped and printed the following: Starting Jest in Watch mode failed too many times and has been stopped.
  • after reloading VSCode 100+ times - vscode-jest started working properly
  • after another VSCode window reload vscode-jest stopped again

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9

github_iconTop GitHub Comments

2reactions
simlevesquecommented, Oct 21, 2019

If you see this, just know that it’s most likely related to Jest watching every files inside your node_modules directory.

Add this to your jest config:

{
    "modulePathIgnorePatterns": [
      "node_modules"
    ]
  }

And then kill all node process currrently running killall -9 node.

It should fix the problem.

0reactions
Mahakbcommented, Mar 29, 2019

I also faced this issue. And the issue was with the name of my Project.

The Project Name should not have any space in it. Once, I changed the name of the project it worked perfectly for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Prevent vscode-jest-tests from opening new terminal
I am using vscode-jest and the "debug" code lens to run individual tests. However, when running a test like this it spawns a...
Read more >
Troubleshooting - Jest
Troubleshooting. Uh oh, something went wrong? Use this guide to resolve issues with Jest. Tests are Failing and You Don't Know Why​.
Read more >
vscode-jest - npm Package Health Analysis - Snyk
click on Jest:stopped on status bar to show Jest Output window: · turn on the debug mode: set "jest. · restart vscode-jest or...
Read more >
Debugging Jest With Vscode - JSTwister
out what happens with my Jest tests. If you are a fan of VSCode , like I'm, you can set it up very...
Read more >
Configuring Jest for Visual Studio Code - Beyond Java
Before installing vscode-jest, get Jest up and running on the command line. If you can start Jest by typing jest , you're good...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found