@@ -3,22 +3,23 @@ var path = require("path");
33var Promise = require ( "nodegit-promise" ) ;
44var promisify = require ( "promisify-node" ) ;
55var fse = promisify ( require ( "fs-extra" ) ) ;
6+ var local = path . join . bind ( path , __dirname ) ;
67var fixAppveyor = process . env . APPVEYOR ? describe . skip : describe ;
78
89fixAppveyor ( "Clone" , function ( ) {
9- var http = path . resolve ( "test /repos/http") ;
10- var https = path . resolve ( "test /repos/https") ;
11- var ssh = path . resolve ( "test /repos/ssh") ;
12- var sshManual = path . resolve ( "test /repos/sshmanual") ;
13- var git = path . resolve ( "test /repos/git") ;
14- var file = path . resolve ( "test /repos/file") ;
10+ var http = local ( ".. /repos/http") ;
11+ var https = local ( ".. /repos/https") ;
12+ var ssh = local ( ".. /repos/ssh") ;
13+ var sshManual = local ( ".. /repos/sshmanual") ;
14+ var git = local ( ".. /repos/git") ;
15+ var file = local ( ".. /repos/file") ;
1516
16- var sshPublicKey = path . resolve ( " ./id_rsa.pub") ;
17- var sshPrivateKey = path . resolve ( " ./id_rsa") ;
17+ var sshPublicKey = local ( ". ./id_rsa.pub") ;
18+ var sshPrivateKey = local ( ". ./id_rsa") ;
1819
19- var Repository = require ( "../../lib/repository" ) ;
20- var Clone = require ( "../../lib/clone" ) ;
21- var NodeGit = require ( "../../" ) ;
20+ var Repository = require ( local ( "../../lib/repository" ) ) ;
21+ var Clone = require ( local ( "../../lib/clone" ) ) ;
22+ var NodeGit = require ( local ( "../../" ) ) ;
2223
2324 // Set a reasonable timeout here now that our repository has grown.
2425 this . timeout ( 15000 ) ;
@@ -98,7 +99,7 @@ fixAppveyor("Clone", function() {
9899
99100 it ( "can clone with filesystem" , function ( ) {
100101 var prefix = process . platform === "win32" ? "" : "file://" ;
101- var url = prefix + path . resolve ( "test /repos/empty") ;
102+ var url = prefix + local ( ".. /repos/empty") ;
102103
103104 return Clone . clone ( url , file ) . then ( function ( repository ) {
104105 assert . ok ( repository instanceof Repository ) ;
0 commit comments