Skip to content
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

Jest not running #348

Closed
indiejames opened this issue Jul 13, 2018 · 6 comments
Closed

Jest not running #348

indiejames opened this issue Jul 13, 2018 · 6 comments

Comments

@indiejames
Copy link

Environment

  1. node -v: [v8.11.2]

  2. npm -v: [6.1.0]

  3. npm ls react-scripts (if you haven’t ejected): [[email protected] /Users/jnorton1/Node.js/jtest_test
    └── (empty)]

  4. Operating system: [macOS 10.12.6]

Steps to Reproduce

Create a simple node project with npm -init and add jest as a dependency using yarn add --dev jest. Then create a simple source file and test file following the jest "getting started" instructions https://jestjs.io/docs/en/getting-started. Verify from command line that jest works by running yarn test in the project directory.

Expected Behavior

Open VS Code in the project directory and open test file. Expect to see solid green circle next to test indicating test has run.

Actual Behavior

See unfilled green circle indicating test has not been run. Hovering over circle gives this message:
"Test has not run yet, due to Jest only running tests related to changes.". Attempting to change code of called function does not run test. Attempting to force jest startup using Jest: Start Runner from command palette has no effect.

@indiejames
Copy link
Author

Update: Running 'Jest: Show Test Output Channel' indicates that jest is running, but for some reason the UI is not updating. I also noticed when I restarted that there is now a warning message that the extension requires features of jest 20+ and some things may not work correctly. 'jest -version' prints 23.4.0, however, so I'm not sure why the extension is complaining, unless it is using a different jest installation. I have set "jest.pathToJest": "/usr/local/bin/jest" in my prefs, so I don't see that happening.

@hugocaillard
Copy link

I did try to install jest globally and add the pasToJest options point to my global node modules but the UI is still not update on my side

@SeamusY
Copy link

SeamusY commented Jul 17, 2018

To run the actual function it's just

"Jest Start Runner"

Someone messed up on the commands...

@hugocaillard
Copy link

I do have the logs
"Finished running all tests. Starting watch mode."
(Automatically our by running "jest start runner"), but still no update on the UI.

@connectdotz
Copy link
Collaborator

the current vscode-jest has a compatibility issue with jest 23.x (jest/#6586). We hope to release PR #341 as soon as possible to address this issue... until then, you can try downgrading to jest 22.x.

@connectdotz
Copy link
Collaborator

vscode-jest 2.9.0 has shipped with jest 23.x support and more, which should address this issue. Feel free to reopen if otherwise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants