mmkal / handy-redis

A wrapper around node_redis with Promise and TypeScript support.
Apache License 2.0
172 stars 10 forks source link

Add coverage to generation code #266

Closed mmkal closed 3 years ago

mmkal commented 3 years ago

None of it ships with the library, but it's useful to spot redundancy, and unused default values etc. The initial pass caught a few places where schema.title || arg.name was unnecessary. To get that level of coverage there need to be zero uncovered lines. It forces some generally-good refactoring too.

codecov-io commented 3 years ago

Codecov Report

Merging #266 (78405d3) into master (6db3107) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##            master      #266    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files            4         8     +4     
  Lines           59       420   +361     
  Branches         7        98    +91     
==========================================
+ Hits            59       420   +361     
Impacted Files Coverage Δ
codegen/generate-client.ts 100.00% <100.00%> (ø)
codegen/generate-schema.ts 100.00% <100.00%> (ø)
codegen/generate-tests.ts 100.00% <100.00%> (ø)
codegen/patches/schema.ts 100.00% <100.00%> (ø)
codegen/util.ts 100.00% <100.00%> (ø)
src/index.ts
src/node_redis/index.ts
src/flatten.ts
src/node_redis/multi.ts
codegen/patches/markdown.ts 100.00% <0.00%> (ø)
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 6db3107...78405d3. Read the comment docs.