vscode-jest-runner
vscode-jest-runner copied to clipboard
Error with template literal index
Hello,
I love this plugin that offer a simple way to "Run | Debug" a test generating directly correct command line :) I often used it.each and template literal like this
it.each`
a | b
${1} | ${2}
${1} | ${2}
`('Test $a $b', ({ a, b }) => {
[...]
});
the problem is when I want to used index, $#
, the generated command line not working.
It generates
[...] -t "EcheancesDelais_BoutonPaiementComponent \$# Test (.*?) (.*?)"
The \$#
not matches anything and tests are skipped
The workaround for now is to modify the command line with (.+?)
(very simple way)
[...] -t "EcheancesDelais_BoutonPaiementComponent (.+?) Test (.*?) (.*?)"
√ 0 Test 1 2 (132 ms)
√ 1 Test 1 2 (9 ms)
It would be great if the plugin can manage this template literal index $#
(which is %#
in array each execution)
i think its just missing the escaping for this character.