Skip to content

Commit 754532c

Browse files
committed
Updated convenience-repo tests
1 parent 22402dd commit 754532c

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

test/convenience-repo.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ var helper = {
1616
try {
1717
fun();
1818
test(false, label);
19-
}
20-
catch (ex) {
19+
} catch (ex) {
2120
test(true, label);
2221
}
2322
}
@@ -37,13 +36,12 @@ exports.method = function(test){
3736
}, 'Throw an exception if no callback');
3837

3938
// Test invalid repository
40-
git.repo('/etc/hosts', function(err, path) {
41-
test.equals('The specified repository is invalid', err.message, 'Invalid repository error code');
39+
git.repo('/etc/hosts', function(error, path) {
40+
test.equals(error.code, error.GITERR_REPOSITORY, error.message, 'Invalid repository error code');
4241

4342
// Test valid repository
44-
git.repo('../.git', function(err, path) {
45-
test.equals(0, err, 'Valid repository error code');
46-
43+
git.repo('../.git', function(error, path) {
44+
test.equals(null, error, 'Valid repository error code');
4745
test.done();
4846
});
4947
});

0 commit comments

Comments
 (0)