Skip to content

Commit f4000cf

Browse files
committed
Bitbucket example
1 parent 6c574a6 commit f4000cf

1 file changed

Lines changed: 21 additions & 1 deletion

File tree

‎test/tests/clone.js‎

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ describe("Clone", function() {
315315
}).catch(function(reason) { });
316316
});
317317

318-
it("should fail fast if repo not found", function() {
318+
it("should fail fast if repo not found [GitHub]", function() {
319319
var url = "https://github.com/nodegit/test404.git";
320320
return Clone(url, clonePath, {
321321
fetchOpts: {
@@ -335,4 +335,24 @@ describe("Clone", function() {
335335
});
336336
});
337337

338+
it("should fail fast if repo not found [Bitbucket]", function() {
339+
var url = "https://bitbucket.org/nodegit/test404.git";
340+
return Clone(url, clonePath, {
341+
fetchOpts: {
342+
callbacks: {
343+
certificateCheck: function() {
344+
return 1;
345+
},
346+
credentials: function() {
347+
return NodeGit.Cred.userpassPlaintextNew("fake-token",
348+
"x-oauth-basic");
349+
}
350+
}
351+
}
352+
})
353+
.catch(function(err) {
354+
assert.ok(err);
355+
});
356+
});
357+
338358
});

0 commit comments

Comments
 (0)