Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running tests with function or variable inside the name are not found #357

Open
NikFrancelj opened this issue Mar 1, 2024 · 2 comments
Open

Comments

@NikFrancelj
Copy link

NikFrancelj commented Mar 1, 2024

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.

@firsttris
Copy link
Owner

firsttris commented Mar 1, 2024

i dont think this willl work because addTags() first needs to be resolved by a compiler to get the string.

@mtoy-googly-moogly
Copy link

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)}`, () => ....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants