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

not support jestrunner.configPath in vscode workspace #126

Closed zhongzhong0505 closed 2 years ago

zhongzhong0505 commented 3 years ago

image

mgutz commented 3 years ago

I found a workaround for a different stting that had the same error. I added jestrunner.jestPath setting to my .code-workspace file. For example

{
  "folders": [
    {
      "name": "root",
      "path": "."
    },
    {
      "path": "packages/backend"
    },
    {
      "path": "packages/frontend"
    }
  ],
  "settings": {
    "files.exclude": {
      "packages": true
    },
    "jestrunner.jestPath": "node_modules/jest/bin/jest.js"
  }
}

That got me working. Not sure if that will fix your issue

basickarl commented 3 years ago

Yea I'm getting the same issue. I have a custom jest config file which has a custom testMatch settings, doesn't seem to load "run | debug" above the test in vscode in the correct files.

firsttris commented 2 years ago

i think its just a batter of the naming of your config file:

https://github.com/firsttris/vscode-jest-runner/blob/master/src/jestRunnerConfig.ts#L111

please re-open if your issue still persists.