tarmolov / git-hooks-js

A tool to manage and run project git hooks
167 stars 30 forks source link

Test with real git dir #58

Closed rjmunro closed 6 years ago

rjmunro commented 6 years ago

New code fails with fake .git dir as it doesn't guess, it asks git.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+1.05%) to 98.947% when pulling 7004bddff561a4c0ae86d9a01b603d05e0dd7798 on rjmunro:feature/improve-tests into 595105988635101f2cc20559b8309520cdf075eb on tarmolov:master.

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-2.02%) to 93.939% when pulling 51c309cc1c83b9653c7e02ede0da1fd12d35761c on rjmunro:feature/improve-tests into e83af69d6c80979e8ca603417836df5a90fa16ce on tarmolov:master.

rjmunro commented 6 years ago

@tarmolov I've fixed the uninstall test and added a new test for a missing hooks folder, so I think the coverage is as high as it can be. I can't figure out a way to cause an exception to cover the last uncovered line. I'm tempted to just remove the try ... catch to get the 100% coverage, but I don't think that would be good practise :-).

It may be possible to get the 100% coverage by converting to promises instead of callbacks, as they could handle the exception automatically, but that would require quite a large rework.

tarmolov commented 6 years ago

Thank you!