Testing code lens for wrapped test method
See original GitHub issueIs your feature request related to a problem? Please describe.
As Deno has declined to extend their test API with hooks such as before/after, in some cases it is needed to extend this capability by wrapping the test method. As has been done in test_suite.
However, when doing so the extension fails to detect the new wrapped method as a test and doesn’t provide code lens to allow tests to be run individually.
(line 10 has no Run test
despite being recognized by Deno)
Describe the solution you’d like
Either a special syntax/annotation/type to mark a certain function as equivalent to Deno.test
or tapping into Deno’s test detection and possibly using stack trace at the time of test registration to find indirectly registered tests.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:5 (4 by maintainers)
Top Results From Across the Web
View unit test results with CodeLens - Visual Studio Tutorial
You can see there's nothing between the test method and the declaration of the method. Now I'll go enable CodeLens. Easiest way to...
Read more >Run/Debug code lenses don't appear · Issue #470 - GitHub
I'm having the same issue on two entirely separate machines; code lenses have stopped appearing and no tests are showing up in the...
Read more >testing – James Pearson
Running one or more tests – regardless of where you run them from (Test Explorer, Command Palette, CodeLens, Keyboard Shortcut) – will start...
Read more >Announcing CodeLens for C++ Unit Testing
To update the test status, you can Run the test directly from CodeLens above the desired test method. If your test fails, you...
Read more >Programmatic Language Features - Visual Studio Code
Visual Studio Code language extensions contribute programming language features. ... function onChange() { let uri = document.uri; check(uri.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@kitsonk @dsherret , any thoughts about revisiting this?
There are lots of alternative testing paradigms and frameworks. Some sort of code lens API or wrapper recognition signal would be quite helpful to encourage the ecosystem. Currently, the code lens doesn’t recognize the BDD example tests included in std 0.143.0 (https://github.com/denoland/deno_std/blob/0.143.0/testing/bdd_examples/user_flat_test.ts).
I’m using tincan for writing tests, which uses a Jest-like api. So using a wrapper as shown above is not really an option in this case I think.