-
Notifications
You must be signed in to change notification settings - Fork 30
Test with real git dir #58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
tests/install.test.js
Outdated
| var fsHelpers = require('../lib/fs-helpers'); | ||
|
|
||
| var SANDBOX_PATH = __dirname + '/tmp-sandbox/'; | ||
| var SANDBOX_PATH = '/tmp/tmp-sandbox/'; |
There was a problem hiding this comment.
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.
New code fails with fake .git dir as it doesn't guess, it asks git.
c1979ee to
195a8c5
Compare
It was running the install, not uninstall command.
|
@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. |
|
Thank you! |
New code fails with fake .git dir as it doesn't guess, it asks git.