Vscode-jest: Support running jest command from a path that is not the project's root

Created on 1 Dec 2016  路  9Comments  路  Source: jest-community/vscode-jest

This https://github.com/orta/vscode-jest/pull/25 wasn't quite right in the end, I need to run npm run jest -- --watch from the root of the jest repo in order to ensure the build transformations work right. So ideally, I'd be able to say "if I open at this folder, use this as cwd for jest".

Most helpful comment

Exception raised: Process failed: spawn npm ENOENT

All 9 comments

is this the reason I'm getting Exception raised: Process failed: spawn node_modules\.bin\jest.cmd ENOENT?

Nah, I don't think so, do those files exist for you? what is the path to your Jest script

"test": "jest --coverage",

image

can you try setting your jest.pathToJest for this project to be npm test --?

where do I set this up?

in your project settings .vscode/settings.json

Exception raised: Process failed: spawn npm ENOENT

@luisrudge would recommend cloning this extension and having a look at what's going on

Closing, this isn't really the fix I was looking for.

Was this page helpful?
0 / 5 - 0 ratings