numo-labs / lambda-taggable-createDocument

:memo: Tag-E Create and Update Documents
3 stars 0 forks source link

Fix snake_case and remove `failOnError` #26

Closed hassy closed 8 years ago

hassy commented 8 years ago
hassy commented 8 years ago

Two if (err) {} branches are set to be ignored for coverage - I don't see an easy way to test those branches, maybe @nelsonic can offer some ideas? (Personally I'd be happy ignoring those for coverage).

codecov-io commented 8 years ago

Current coverage is 100%

Merging #26 into master will not change coverage

@@             master        #26   diff @@
==========================================
  Files             4          4          
  Lines            61         63     +2   
  Methods           9          9          
  Messages          0          0          
  Branches         13         15     +2   
==========================================
+ Hits             61         63     +2   
  Misses            0          0          
  Partials          0          0          

Powered by Codecov. Last updated by c401a88...5e6a993

tomgco commented 8 years ago

Two if (err) {} branches are set to be ignored for coverage - I don't see an easy way to test those branches, maybe @nelsonic can offer some ideas? (Personally I'd be happy ignoring those for coverage).

Should be easy to use sinon and mock / stub those handler.methods to always return an error and assert that the failed callback is called?

hassy commented 8 years ago

@tomgco Yeah, I'll do that.

Those two branches would only be exercised if:

So a test that exercises those branches is literally testing the implementation, but I guess you must do that for 100% coverage (not sold on this personally).

nelsonic commented 8 years ago

@hassy no objection to the /* istanbul ignore if */ the handler.initTagDoc should not throw an error ... and jumping through hoops using mocks in order to throw and error is "testing the implementation" ...

hassy commented 8 years ago

Added tests to cover those anyway :)

nelsonic commented 8 years ago

@hassy cool. 🍭