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

lsp: support detecting test built on top of Deno.test() like std/testing/bdd #14804

Open
glebbash opened this issue May 30, 2022 · 4 comments
Open
Labels
lsp related to the language server suggestion suggestions for new features (yet to be agreed)

Comments

@glebbash
Copy link

Is your feature request related to a problem? Please describe.

Testing UI integration does not show tests defined written in BDD style (https://deno.land/[email protected]/testing/bdd.ts).

Describe the solution you'd like

Would be nice to have them displayed. For now the only workaround is to just use default Deno.test

@kitsonk kitsonk transferred this issue from denoland/vscode_deno Jun 6, 2022
@kitsonk kitsonk changed the title BDD tests are not displayed in testing UI lsp: support detecting test built on top of Deno.test() like std/testing/bdd Jun 6, 2022
@kitsonk kitsonk added suggestion suggestions for new features (yet to be agreed) lsp related to the language server labels Jun 6, 2022
@kitsonk
Copy link
Contributor

kitsonk commented Jun 6, 2022

This is currently a design limitation, as it would require a reliable way to statically analyze a module for tests without actually running the module. Currently the static analysis is limited to a single module and identifying the Deno.test symbol and tracking tests that are registered.

Things like dynamically generated tests (or test steps) as well as other libraries that build on Deno.test cannot currently be analyzed and I personally currently can envision a good way to accomplish this at the moment. @dsherret I don't know if you have any thoughts on the topic.

@glebbash
Copy link
Author

glebbash commented Jun 6, 2022

Definitely not an easy feature to implement but maybe it makes sense to implement it for bdd library only for now as it is part of std.

@KnorpelSenf
Copy link
Contributor

I agree that static analysis for this would be very hard to do, and it is even harder to do it right. Doing it for /std only is the much more practical solution, albeit not as friendly towards third-party testing frameworks. However, I would argue that those frameworks are not equal to the standard library testing because, well, they're not in the standard library, and hence it is fine to only support /std here.

@nayeemrmn
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lsp related to the language server suggestion suggestions for new features (yet to be agreed)
Projects
None yet
Development

No branches or pull requests

4 participants