Skip to content

Commit 9141d59

Browse files
author
John Haley
committed
Add unique directories to each clone test
1 parent 98119a6 commit 9141d59

1 file changed

Lines changed: 19 additions & 7 deletions

File tree

test/tests/clone.js

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ describe("Clone", function() {
1818
this.timeout(30000);
1919

2020
beforeEach(function() {
21-
return fse.remove(clonePath).catch(function(err) {
21+
return fse.remove(this.clonePath).catch(function(err) {
2222
console.log(err);
2323

2424
throw err;
@@ -49,7 +49,9 @@ describe("Clone", function() {
4949
}
5050
};
5151

52-
return Clone.clone(url, clonePath, opts).then(function(repo) {
52+
test.clonePath = local("../repos/http");
53+
54+
return Clone.clone(url, test.clonePath, opts).then(function(repo) {
5355
assert.ok(repo instanceof Repository);
5456
test.repository = repo;
5557
});
@@ -66,7 +68,9 @@ describe("Clone", function() {
6668
}
6769
};
6870

69-
return Clone.clone(url, clonePath, opts).then(function(repo) {
71+
test.clonePath = local("../repos/https");
72+
73+
return Clone.clone(url, test.clonePath, opts).then(function(repo) {
7074
assert.ok(repo instanceof Repository);
7175
test.repository = repo;
7276
});
@@ -86,7 +90,9 @@ describe("Clone", function() {
8690
}
8791
};
8892

89-
return Clone.clone(url, clonePath, opts).then(function(repo) {
93+
test.clonePath = local("../repos/ssh");
94+
95+
return Clone.clone(url, test.clonePath, opts).then(function(repo) {
9096
assert.ok(repo instanceof Repository);
9197
test.repository = repo;
9298
});
@@ -110,7 +116,9 @@ describe("Clone", function() {
110116
}
111117
};
112118

113-
return Clone.clone(url, clonePath, opts).then(function(repo) {
119+
test.clonePath = local("../repos/sshManual");
120+
121+
return Clone.clone(url, test.clonePath, opts).then(function(repo) {
114122
assert.ok(repo instanceof Repository);
115123
test.repository = repo;
116124
});
@@ -126,7 +134,9 @@ describe("Clone", function() {
126134
}
127135
};
128136

129-
return Clone.clone(url, clonePath, opts).then(function(repo) {
137+
test.clonePath = local("../repos/git");
138+
139+
return Clone.clone(url, test.clonePath, opts).then(function(repo) {
130140
assert.ok(repo instanceof Repository);
131141
});
132142
});
@@ -136,7 +146,9 @@ describe("Clone", function() {
136146
var prefix = process.platform === "win32" ? "" : "file://";
137147
var url = prefix + local("../repos/empty");
138148

139-
return Clone.clone(url, clonePath).then(function(repo) {
149+
test.clonePath = local("../repos/filesystem");
150+
151+
return Clone.clone(url, test.clonePath).then(function(repo) {
140152
assert.ok(repo instanceof Repository);
141153
test.repository = repo;
142154
});

0 commit comments

Comments
 (0)