vscode-jest-runner: regresion yarn2 not work any more

bug with 0.4.39:

stavalfi@stavs-MacBook-Pro singer % node --require '/Users/stavalfi/projects/singer/.pnp.js' "" '/Users/stavalfi/projects/singer/packages/csm/__tests__/scheduld-all-research-calls-are-called.spec.ts' -t 'send pf message and then rb message to create a match for future game \(without molly messages\) and expect researchll 4 times and also after first-half is finished'
Welcome to Node.js v14.16.0.
Type ".help" for more information.
>

it seems that node interpeter is opened instead of running jest. I assume it is caused due to the fact the “jest” path is missing in the command.


bug with with version 0.4.34 (and 0.4.33): (when running “run” it’s working, when running with debug - it’s broken):

p/singer {stav/SIN-163} $ /usr/bin/env 'NODE_OPTIONS=--require "/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/ms-vscode.js-debug/src/bootloader.bundle.js" --inspect-publish-uid=http' 'VSCODE_INSPECTOR_OPTIONS={"inspectorIpc":"/var/folders/fh/lk3kyv9n29v3w36bqyv_y7d00000gn/T/node-cdp.21569-1.sock","deferredMode"}:false,"waitForDebugger":"","execPath":"/var/folders/fh/lk3kyv9n29v3w36bqyv_y7d00000gn/T/fnm-shell-9291080/bin/node","onlyEntrypoint":false,"autoAttachMode":"always","fileCallback":"/var/folders/fh/lk3kyv9n29v3w36bqyv_y7d00000gn/T/node-debug-callback-11f29c16e8fe78a3"}' /var/folders/fh/lk3kyv9n29v3w36bqyv_y7d00000gn/T/fnm-shell-9291080/bin/node --require /Users/stavalfi/projects/singer/.pnp.js "`yarn bin jest`" /Users/stavalfi/projects/singer/packages/csm/__tests__/schedulder/matching-after-game-started.spec.ts -t "send running-ball and punteam-fixture messages \\(which are related\\) but only after we should have called the first call to research - expect to skip the first call and expect we called the second time" --runInBand 
Debugger attached.
Waiting for the debugger to disconnect...
/Users/stavalfi/projects/singer/.pnp.js:19054
    throw firstError;
    ^

Error: Qualified path resolution failed - none of the candidates can be found on the disk.

Source path: /Users/stavalfi/projects/singer/`yarn bin jest`
Rejected candidate: /Users/stavalfi/projects/singer/`yarn bin jest`
Rejected candidate: /Users/stavalfi/projects/singer/`yarn bin jest`.js
Rejected candidate: /Users/stavalfi/projects/singer/`yarn bin jest`.json
Rejected candidate: /Users/stavalfi/projects/singer/`yarn bin jest`.node

    at internalTools_makeError (/Users/stavalfi/projects/singer/.pnp.js:18798:34)
    at resolveUnqualified (/Users/stavalfi/projects/singer/.pnp.js:19837:13)
    at resolveRequest (/Users/stavalfi/projects/singer/.pnp.js:19861:14)
    at Object.resolveRequest (/Users/stavalfi/projects/singer/.pnp.js:19933:26)
    at Function.external_module_.Module._resolveFilename (/Users/stavalfi/projects/singer/.pnp.js:19031:34)
    at Function.external_module_.Module._load (/Users/stavalfi/projects/singer/.pnp.js:18896:48)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
    at internal/main/run_main_module.js:17:47

@alexkuc it will be very appriciated if you can take a quick look!

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 24 (13 by maintainers)

Most upvoted comments

@firsttris I checked in 0.4.44 and the tests run. Love it! Thanks

the best solution would be if i could directly start yarn from vscode debug config, not node.

Heyo! Just found this issue and I hope I can add some more information to help. The environment the code is running is Yarn 2 with PnP in a monorepo.

When I have 0.4.39 installed I am experiencing the following when running a test via the Run code lens Screen Shot 2021-06-10 at 2 48 11 PM

I went and tried installing different versions of the extensions and 0.4.34 is latest version that works, so it might be the regression was introduced in 0.4.35.

I verified that both the Run and Debug code lens actions work in 0.4.34.

PS Thanks for this great extension!