Closed sim099 closed 3 years ago
I also encountered this issue on 0.4.35, downgrading the extension to version 0.4.34 appears to work for me.
I also encountered this issue on 0.4.35, downgrading the extension to version 0.4.34 appears to work for me.
That's worked for me too.
Thanks 👍
Can confirm the same issue on Windows.
Same issue on windows. Looks like it's trying to escape special characters using a forward slash, presumably due to #162
c://some-dirs//mytest/.test/.js
which shell are you using on windows? with powershell or bash it should work, only with commandline you should face this issue. is this correct?
I'm using Powershell 7.1.3, though I seem to face the same issue in cmd as well
which shell are you using on windows? with powershell or bash it should work, only with commandline you should face this issue. is this correct?
PowerShell
I wasn't sure how to see which version, but a quick Google revealed the following
PS C:\repo_path> Get-Host | Select-Object Version
Version
-------
5.1.19041.906
I can confirm the same issue. Downgrading to 0.4.34 works fine.
Issue is the command when it's executing the test:
The test file name is: test-foo.spec.ts
It's adding extra '/' everywhere even on the name...
node "c:/Workspaces/project-test/node_modules/jest/bin/jest.js" "c://Workspaces//project-test//src//__tests__//moduleTest//test-foo/.spec/.ts" -t "Foo_Bar\.yml test data"
Also good to note that clicking "debug" does not have the same problem. Meaning the special character "fix" isn't applied when debugging.
The main problem is that the regex escape is executed before the normalizePath
in buildJestArgs
which converts \
to /
effectively breaking the regex.
Weirdly though I tried to manually put back backspaces in the command passed and it still didn't work.
I think that "escapeRegex" fix was incorrect, insufficiently tested and requires a bit more thinking and should be reverted for now
Downgrade worked for me as well :)
i might have found the issue, and tested on my windows machine.
v 0.4.38 should fix this issue, if not please re-open.
thx for reporting
i might have found the issue, and tested on my windows machine.
v 0.4.38 should fix this issue, if not please re-open.
thx for reporting
It was v0.4.39 by the time I installed the update a few minutes ago, but it does indeed work.
Thanks for fixing!
I'm running The following VSCode under Windows
10.0.19042 Build 19042
:When I click on "Run", a command line similar to this is executed:
node "c:/Users/path/to/git/repo/node_modules/jest/bin/jest.js" "c://Users//path//to//git//repo//api//__tests__//unit//module/.test/.js" -c "c:/Users/path/to/git/repo/api/jest.config.js" -t "update-elements-stats tests"
The command runs successfully but doesn't find any tests to run. It looks like the path to the actual test file was originally in windows format and escaped with
\
, but the\
have been replaced with/
. This results in the path used including double//
and the filename it's looking for beingmodule/.test/.js
, meaning that the file isn't found.