Skip to content

Conversation

@rjmunro
Copy link
Contributor

@rjmunro rjmunro commented May 3, 2018

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

@coveralls
Copy link

coveralls commented May 3, 2018

Coverage Status

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

@coveralls
Copy link

Coverage Status

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

var fsHelpers = require('../lib/fs-helpers');

var SANDBOX_PATH = __dirname + '/tmp-sandbox/';
var SANDBOX_PATH = '/tmp/tmp-sandbox/';
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use mktemp -d here. It creates a temporary directory and returs its name.

rjmunro added 2 commits May 4, 2018 09:34
New code fails with fake .git dir as it doesn't guess, it asks git.
@rjmunro rjmunro force-pushed the feature/improve-tests branch from c1979ee to 195a8c5 Compare May 4, 2018 08:35
@rjmunro
Copy link
Contributor Author

rjmunro commented Jun 6, 2018

@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 tarmolov merged commit f7e9bd5 into tarmolov:master Jun 11, 2018
@tarmolov
Copy link
Owner

Thank you!

@rjmunro rjmunro deleted the feature/improve-tests branch September 26, 2018 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants