firsttris / vscode-jest-runner

Simple way to run or debug one or more tests from context menu, codelens or command plalette
https://marketplace.visualstudio.com/items?itemName=firsttris.vscode-jest-runner
MIT License
264 stars 124 forks source link

Add option to run with coverage #279

Closed DW8Reaper closed 1 year ago

DW8Reaper commented 1 year ago

This is a feature request not an issue

Currently I can (and do) manually add the --coverage flag to the jest runner's runOptions. The only downside is generating coverage makes the tests run quite a bit longer than usual. I usually add the --coverage option to see initial coverage, then return to settings and remove it, add some more tests and then re-add it again to check my coverage. This makes the whole process faster since my tests run faster in that period where I have coverage disabled.

It would be great to have an additional run option "Run with coverage" inline in the code then I can just click that when I want coverage and the normal run/debug when I don't

cdaringe commented 1 year ago

It's an interesting idea, no doubt. Wanna try a POC?

DW8Reaper commented 1 year ago

Hey @cdaringe sure that would be awesome I'll try to get it going and make a PR

Thanks

firsttris commented 1 year ago

merged