firsttris / vscode-jest-runner

Simple way to run or debug one or more tests from context menu, codelens or command plalette
https://marketplace.visualstudio.com/items?itemName=firsttris.vscode-jest-runner
MIT License
265 stars 124 forks source link

fix: fix issue when jest is not installed at the root of the project #156

Closed mjeanroy closed 3 years ago

mjeanroy commented 3 years ago

Hi,

This is my attempt to fix #135 (already tested on a personnal project). Basically, instead of returning the root of the project as the current working directory, I try to detect where jest is "really" installed (starting at the file path, go up until I find node_modules/jest binary), so that we can run it from there.

Close #135

[EDIT]: Just saw #143, please let me know if this PR is still relevant ;)

firsttris commented 3 years ago

good job! works for me, lets merge and see if it causes issues for someone :dagger:

mjeanroy commented 3 years ago

Thanks a lot @firsttris (and thanks for this awesome extension btw)!