@@ -18,25 +18,10 @@ describe("Clone", function() {
1818 this . timeout ( 30000 ) ;
1919
2020 beforeEach ( function ( ) {
21- if ( this . clonePath ) {
22- return fse . remove ( this . clonePath ) . catch ( function ( err ) {
23- console . log ( err ) ;
21+ return fse . remove ( clonePath ) . catch ( function ( err ) {
22+ console . log ( err ) ;
2423
25- throw err ;
26- } ) ;
27- }
28- } ) ;
29-
30- afterEach ( function ( done ) {
31- if ( this . repository ) {
32- this . repository . stateCleanup ( ) ;
33- this . repository . free ( ) ;
34- delete this . repository ;
35- }
36-
37- process . nextTick ( function ( ) {
38- global . gc ( ) ;
39- done ( ) ;
24+ throw err ;
4025 } ) ;
4126 } ) ;
4227
@@ -51,9 +36,7 @@ describe("Clone", function() {
5136 }
5237 } ;
5338
54- test . clonePath = local ( "../repos/http" ) ;
55-
56- return Clone . clone ( url , test . clonePath , opts ) . then ( function ( repo ) {
39+ return Clone . clone ( url , clonePath , opts ) . then ( function ( repo ) {
5740 assert . ok ( repo instanceof Repository ) ;
5841 test . repository = repo ;
5942 } ) ;
@@ -70,9 +53,7 @@ describe("Clone", function() {
7053 }
7154 } ;
7255
73- test . clonePath = local ( "../repos/https" ) ;
74-
75- return Clone . clone ( url , test . clonePath , opts ) . then ( function ( repo ) {
56+ return Clone . clone ( url , clonePath , opts ) . then ( function ( repo ) {
7657 assert . ok ( repo instanceof Repository ) ;
7758 test . repository = repo ;
7859 } ) ;
@@ -92,9 +73,7 @@ describe("Clone", function() {
9273 }
9374 } ;
9475
95- test . clonePath = local ( "../repos/ssh" ) ;
96-
97- return Clone . clone ( url , test . clonePath , opts ) . then ( function ( repo ) {
76+ return Clone . clone ( url , clonePath , opts ) . then ( function ( repo ) {
9877 assert . ok ( repo instanceof Repository ) ;
9978 test . repository = repo ;
10079 } ) ;
@@ -118,9 +97,7 @@ describe("Clone", function() {
11897 }
11998 } ;
12099
121- test . clonePath = local ( "../repos/sshManual" ) ;
122-
123- return Clone . clone ( url , test . clonePath , opts ) . then ( function ( repo ) {
100+ return Clone . clone ( url , clonePath , opts ) . then ( function ( repo ) {
124101 assert . ok ( repo instanceof Repository ) ;
125102 test . repository = repo ;
126103 } ) ;
@@ -137,9 +114,7 @@ describe("Clone", function() {
137114 }
138115 } ;
139116
140- test . clonePath = local ( "../repos/git" ) ;
141-
142- return Clone . clone ( url , test . clonePath , opts ) . then ( function ( repo ) {
117+ return Clone . clone ( url , clonePath , opts ) . then ( function ( repo ) {
143118 test . repository = repo ;
144119 assert . ok ( repo instanceof Repository ) ;
145120 } ) ;
@@ -150,9 +125,7 @@ describe("Clone", function() {
150125 var prefix = process . platform === "win32" ? "" : "file://" ;
151126 var url = prefix + local ( "../repos/empty" ) ;
152127
153- test . clonePath = local ( "../repos/filesystem" ) ;
154-
155- return Clone . clone ( url , test . clonePath ) . then ( function ( repo ) {
128+ return Clone . clone ( url , clonePath ) . then ( function ( repo ) {
156129 assert . ok ( repo instanceof Repository ) ;
157130 test . repository = repo ;
158131 } ) ;
0 commit comments