codemod icon indicating copy to clipboard operation
codemod copied to clipboard

[codemod] Test coverage of CLI could be improved

Open spirulence opened this issue 1 year ago • 1 comments

Issue Description

Select one of: [ ] Generated codemod is not correct [ ] Bug in Codemod Studio [ ] UI/UX improvement request [X] Feature request

Unit test coverage on the CLI package could be better, to help contributors prevent regressions. Results of npx vitest --coverage on a recent main commit f3fc6be3 CleanShot 2024-12-10 at 15 26 59

Steps to Reproduce

  1. Navigate to the CLI folder - apps/cli
  2. Run npx vitest --coverage

Actual Results

Test coverage is sitting between 3% and 42%, depending on which metric is the most important.

Expected Results

I'd love to see metrics > 60% across all of these metrics: statements, branches, functions, and lines. My prior experience suggests that there are diminishing returns above 70%, in terms of the effort required to get there and the effort then required to rewrite those tests as other code changes.

I would love to hear from the community if this is a worthwhile goal. I have one PR ready to merge that improves this, and others can likely come piecemeal.

Technical details

  • NodeJS 20

spirulence avatar Dec 10 '24 23:12 spirulence

chatted with Mo... assigning this to our awesome intern, amirabbas...

THANK YOU cameron. you are a champ. very grateful to you.

alexbit-codemod avatar Dec 10 '24 23:12 alexbit-codemod

we have a brand new CLI! and the linked PR here is merged. closing this out. thanks again for your contributions cameron.

alexbit-codemod avatar Jul 04 '25 01:07 alexbit-codemod