-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quote for both run and debug so it.each works #311
base: master
Are you sure you want to change the base?
Conversation
Quote for both run and debug
thanks for your contribution |
@firsttris hello, I've stumbled upon this issue too and glad to see that fix exists. Kindly advice if you plan to accept this PR. |
@@ -177,7 +177,7 @@ export class JestRunner { | |||
config.program = `.yarn/releases/${this.config.getYarnPnpCommand}`; | |||
} | |||
|
|||
const standardArgs = this.buildJestArgs(filePath, currentTestName, false); | |||
const standardArgs = this.buildJestArgs(filePath, currentTestName, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually oops, this breaks the given example on windows + powershell and windows + cmd
Reason is this line:
vscode-jest-runner/src/util.ts
Line 61 in e3f7c76
const q = isWindows() ? '"' : `'`; |
cmd /C "set "NODE_OPTIONS=--require "c:/Program Files/Microsoft VS Code/resources/app/extensions/ms-vscode.js-debug/src/bootloader.js" --inspect-publish-uid=http" && set "VSCODE_INSPECTOR_OPTIONS={"inspectorIpc":"\\\\.\\pipe\\node-cdp.81396-aa5050a0-4.sock","deferredMode":false,"waitForDebugger":"","execPath":"C:\\Users\\user\\scoop\\apps\\nvm\\current\\nodejs\\nodejs\\node.exe","onlyEntrypoint":false,"autoAttachMode":"always","fileCallback":"C:\\Users\\user\\AppData\\Local\\Temp\\node-debug-callback-b17a11136f9e296d"}" && C:\Users\user\scoop\apps\nvm\current\nodejs\nodejs\node.exe node_modules/jest/bin/jest.js """c:/Users/user/git/examples/examples.test.ts""" -t """test with generated (.*?)""" --runInBand "
Maybe this arg should be based on !isWindows()
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please see comment, thanks
Some more info I found, ~ > echo ?
zsh: no matches found: ? In bash, it just prints So escaping provided by the vscode api does not escape the vscode-jest-runner/src/jestRunner.ts Line 159 in e3f7c76
For powershell on windows, it is trying to match against literal double quotes, so it finds no matches (I don't think double quotes should be being used for powershell at all, but another problem). Here is where ❯ echo """abc"""
"abc" In summary, it seems fine to use single quotes on linux to solve this issue |
Will generate the following command run:
and the following command with debug:
Resulting in: