Skip to content

Commit 2af4f78

Browse files
committed
Added git protocol
1 parent 2aaed86 commit 2af4f78

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

test/tests/clone.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ describe("Clone", function() {
88
var http = path.resolve("test/repos/http");
99
var https = path.resolve("test/repos/https");
1010
var ssh = path.resolve("test/repos/ssh");
11+
var git = path.resolve("test/repos/git");
1112
var file = path.resolve("test/repos/file");
1213

1314
var Repository = require("../../lib/repository");
@@ -19,6 +20,7 @@ describe("Clone", function() {
1920
rimraf(http),
2021
rimraf(https),
2122
rimraf(ssh),
23+
rimraf(git),
2224
rimraf(file),
2325
]);
2426
});
@@ -56,6 +58,17 @@ describe("Clone", function() {
5658
});
5759
});
5860

61+
it("can clone with git", function() {
62+
var url = "git://github.com/nodegit/test.git";
63+
var opts = new NodeGit.CloneOptions();
64+
65+
opts.ignoreCertErrors = 1;
66+
67+
return Clone.clone(url, git, opts).then(function(repository) {
68+
assert.ok(repository instanceof Repository);
69+
});
70+
});
71+
5972
it("can clone with filesystem", function() {
6073
var url = "file://" + path.resolve("test/repos/empty");
6174

0 commit comments

Comments
 (0)