vscode-jest-runner
vscode-jest-runner copied to clipboard
Running tests with function or variable inside the name are not found
Hey, we have an issue with running tests with pinned run/debug
and would like to know if the following is even doable with this extension.
If your describe
or it
contains a function or variable inside the name or in string literal it doesn't find the test.
e.g.,
describe(addTag(Tags.UNIT, 'Some name'), () => ... )
Clicking on Run/Debug
tries matching by addTag\(Tags\.UNIT, 'Some name'\)
which results in test not found.
Thanks.
i dont think this willl work because addTags() first needs to be resolved by a compiler to get the string.
If instead of addTag
you use ${}
to add the tag, then jestrunner does coolness to make the click work ...
describe(`Test Name - ${justTag(Tags.UNIT)}`, () => ....