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

resolve jest test name string interpolation for test pattern such as test.each #148

Closed gregoryzh closed 3 years ago

gregoryzh commented 3 years ago

for example, for test name "check result should be ${expected}" since the variable will be resolved at run time, so using -t with the variable name will not match the test, so this PR added a function to convert it to "check result should be (.*?)"

A more specific case: say when i am running the following test. image

before change image

because the variable in the test name , jest fail to find matching test case.

after change image

gregoryzh commented 3 years ago

resolves #137

gregoryzh commented 3 years ago

@firsttris ,hey, do you have time to take a look?

firsttris commented 3 years ago

hey @gregoryzh good work! thank you very much for this contribution.

firsttris commented 3 years ago

release in version 0.4.33