JosiahWitt / ensure

A balanced test framework for Go
MIT License
8 stars 0 forks source link

Add support for mocks in tables #17

Closed JosiahWitt closed 3 years ago

JosiahWitt commented 3 years ago

Closes #6

TODO:

codecov-io commented 3 years ago

Codecov Report

Merging #17 (18943a5) into master (30a5844) will increase coverage by 1.15%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #17      +/-   ##
==========================================
+ Coverage   98.19%   99.34%   +1.15%     
==========================================
  Files           5       11       +6     
  Lines         166      461     +295     
==========================================
+ Hits          163      458     +295     
  Misses          2        2              
  Partials        1        1              
Impacted Files Coverage Δ
cmd/ensure/internal/cmd/generate_mocks.go 100.00% <100.00%> (ø)
cmd/ensure/internal/cmd/root.go 100.00% <100.00%> (ø)
cmd/ensure/internal/ensurefile/ensurefile.go 100.00% <100.00%> (ø)
cmd/ensure/internal/mockgen/mock_destination.go 100.00% <100.00%> (ø)
cmd/ensure/internal/mockgen/mockgen.go 100.00% <100.00%> (ø)
cmd/ensure/internal/runcmd/runcmd.go 100.00% <100.00%> (ø)
ensurepkg/ensurepkg.go 91.66% <100.00%> (+3.66%) :arrow_up:
ensurepkg/run_table.go 100.00% <100.00%> (ø)
... and 4 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 30a5844...18943a5. Read the comment docs.

JosiahWitt commented 3 years ago

Consider logging when skipping assigning to fields in subject. That might help when changing an interface and forgetting to regenerate mocks. Maybe the warning should be for unused mocks? Or just when no mocks match a field that is an interface?