denoland / deno

A modern runtime for JavaScript and TypeScript.
https://deno.com
MIT License
95.61k stars 5.3k forks source link

feat: view test coverage in editor #18147

Open KnorpelSenf opened 1 year ago

KnorpelSenf commented 1 year ago

Deno

It would be amazing if VSCode would display the test coverage right inside the editor.

The line coverage results are very useful when writing tests because they let me easily see which case are covered by tests and which ones are not. However, every time I add a test to cover some more code, I need to run deno test and deno coverage and then reload my browser window.

I am aware that there are third-party tools that should be able to consume the LCOV output and do this, but I would prefer if it would “just work” without any additional configuration.

bartlomieju commented 1 year ago

Seems like a useful feature and I would gladly accept a PR for this, but the core team doesn't have a bandwidth to work on this for a forseeable future.

KnorpelSenf commented 10 months ago

Since you are now focusing on making test coverage more easily accessible, such as via deno coverage --html, would you reconsider this feature request?

KnorpelSenf commented 8 months ago

@bartlomieju how should the user experience be for this? Do people need to run deno test from the command line and then the lsp picks up the output files? I don't want to simply execute the test files in the background all the time in order to update the coverage, that seems too opaque.

nabby27 commented 2 weeks ago

I would like to see this feature, it would be super useful. I have created a $70 bounty for whoever implements it.