Closed IegorShumov closed 8 months ago
I think you can specify jestrunner.jestCommand
as jest
for this purpose?
You can see the default here is node "node_modules/jest/bin/jest.js"
, but the user can override it with jestCommand
https://github.com/firsttris/vscode-jest-runner/blob/a03839fd49a0efc01d28131d7269a5406bc0cb93/src/jestRunnerConfig.ts#L11C1-L23C4
I think you can specify
jestrunner.jestCommand
asjest
for this purpose?You can see the default here is
node "node_modules/jest/bin/jest.js"
, but the user can override it withjestCommand
https://github.com/firsttris/vscode-jest-runner/blob/a03839fd49a0efc01d28131d7269a5406bc0cb93/src/jestRunnerConfig.ts#L11C1-L23C4
Thanks, it works.
What about path relative to jestrunner.projectPath
or something similar?
Thanks, this helped me to find how to use global jest to debug test :
"jestrunner.debugOptions": {
"program" : "${env:node_path}/jest/bin/jest.js"
}
Solutions demonstrated with existing APIs
$ jest bla/bla.test.js
.jestrunner.projectPath
. I defined it according to my path, egc:/projects/prj1
, path to some test -c:/projects/prj1/src/component1/container.test.js
Why runner usednode "node_modules/jest/bin/jest.js" "c:/projects/prj1/src/component1/container.test.js"
? It can be justjest src/component1/container.test.js