Skip to content
Prev Previous commit
Next Next commit
Add unique directories to each clone test
  • Loading branch information
John Haley committed Feb 26, 2015
commit 9141d595f872887b64092d0e56a90c13a615f3bb
26 changes: 19 additions & 7 deletions test/tests/clone.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe("Clone", function() {
this.timeout(30000);

beforeEach(function() {
return fse.remove(clonePath).catch(function(err) {
return fse.remove(this.clonePath).catch(function(err) {
console.log(err);

throw err;
Expand Down Expand Up @@ -49,7 +49,9 @@ describe("Clone", function() {
}
};

return Clone.clone(url, clonePath, opts).then(function(repo) {
test.clonePath = local("../repos/http");

return Clone.clone(url, test.clonePath, opts).then(function(repo) {
assert.ok(repo instanceof Repository);
test.repository = repo;
});
Expand All @@ -66,7 +68,9 @@ describe("Clone", function() {
}
};

return Clone.clone(url, clonePath, opts).then(function(repo) {
test.clonePath = local("../repos/https");

return Clone.clone(url, test.clonePath, opts).then(function(repo) {
assert.ok(repo instanceof Repository);
test.repository = repo;
});
Expand All @@ -86,7 +90,9 @@ describe("Clone", function() {
}
};

return Clone.clone(url, clonePath, opts).then(function(repo) {
test.clonePath = local("../repos/ssh");

return Clone.clone(url, test.clonePath, opts).then(function(repo) {
assert.ok(repo instanceof Repository);
test.repository = repo;
});
Expand All @@ -110,7 +116,9 @@ describe("Clone", function() {
}
};

return Clone.clone(url, clonePath, opts).then(function(repo) {
test.clonePath = local("../repos/sshManual");

return Clone.clone(url, test.clonePath, opts).then(function(repo) {
assert.ok(repo instanceof Repository);
test.repository = repo;
});
Expand All @@ -126,7 +134,9 @@ describe("Clone", function() {
}
};

return Clone.clone(url, clonePath, opts).then(function(repo) {
test.clonePath = local("../repos/git");

return Clone.clone(url, test.clonePath, opts).then(function(repo) {
assert.ok(repo instanceof Repository);
});
});
Expand All @@ -136,7 +146,9 @@ describe("Clone", function() {
var prefix = process.platform === "win32" ? "" : "file://";
var url = prefix + local("../repos/empty");

return Clone.clone(url, clonePath).then(function(repo) {
test.clonePath = local("../repos/filesystem");

return Clone.clone(url, test.clonePath).then(function(repo) {
assert.ok(repo instanceof Repository);
test.repository = repo;
});
Expand Down