firsttris / vscode-jest-runner

Simple way to run or debug one or more tests from context menu, codelens or command plalette
https://marketplace.visualstudio.com/items?itemName=firsttris.vscode-jest-runner
MIT License
265 stars 124 forks source link

Debug skips tests with apostrophes #249

Open benasher44 opened 2 years ago

benasher44 commented 2 years ago

If a describe or it has an apostrophe, the debug command will skip the test entirely. I think there's something wrong with the way apostrophes are being escaped for the shell

norgepaul commented 2 years ago

The tests are skipped if any escaped character appears in describe. I found the issue with parentheses. It started to happen after I updated VSCode to the latest version (1.67.0).

The escaping in the command looks like this.

\\\(e2e\\\)

It seems like there's an additional \ added. If I remove the extra \s the tests are no longer skipped.

fmflame commented 2 years ago

Same happens when you use a . or "" or $ in it or describe - run/debug skip the test case escape slashes are being added and now it doesn't find those files. Extremely annoying...