Quote for both run and debug so it.each works
it.each([1,2,3,4])('should parse and generate %i and generate it again', id => {
...
})
Will generate the following command run:
node 'node_modules/.bin/jest' '/Users/tlb/git/connectedcars/ingester-tl-v2/src/lib/traffilog-parser/tools/monitor-csv-parser.test.ts' -t 'parser should parse and generate (.*?) and generate it again'
and the following command with debug:
... node node_modules/.bin/jest --testTimeout=100000000 --detectOpenHandles /Users/tlb/git/connectedcars/ingester-tl-v2/src/lib/traffilog-parser/tools/monitor-csv-parser.test.ts -t parser\ should\ parse\ and\ generate\ \(.\*?\)\ and\ generate\ it\ again --runInBand
Resulting in:
zsh: no matches found: parser should parse and generate setting (.*?) and generate it again
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.
Some more info I found, ? is a wildcard character in zsh
~ > echo ?
zsh: no matches found: ?
In bash, it just prints ?.
So escaping provided by the vscode api does not escape the ? (and nor should it I think?):
https://github.com/firsttris/vscode-jest-runner/blob/e3f7c76334c248ff426fd078a7634213b4106174/src/jestRunner.ts#L159
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 powershell behaves differently to bash:
❯ echo """abc"""
"abc"
In summary, it seems fine to use single quotes on linux to solve this issue