File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 11var promisify = require ( "promisify-node" ) ;
22var fs = promisify ( "fs" ) ;
3- var exec = promisify ( "child_process" ) . exec ;
3+
4+ // Have to wrap exec, since it has a weird callback signature.
5+ var exec = promisify ( function ( command , callback ) {
6+ return require ( "child_process" ) . exec ( command , callback ) ;
7+ } ) ;
48
59before ( function ( done ) {
10+ this . timeout ( 5000 ) ;
11+
612 var url = "https://github.com/nodegit/nodegit" ;
13+ var done = done . bind ( null , null ) ;
714
8- fs . exists ( "test/repos" ) . then ( null , function ( ) {
15+ fs . exists ( "test/repos" ) . then ( function ( ) {
916 return fs . mkdir ( "test/repos" ) . then ( function ( ) {
1017 return exec ( "git init test/repos/empty" ) ;
1118 } ) . then ( function ( ) {
@@ -17,5 +24,5 @@ before(function(done) {
1724 return fs . writeFile ( nonrepo + "/file.txt" , "This is a bogus file" ) ;
1825 } ) ;
1926 } )
20- } ) . then ( done . bind ( null , undefined ) , done . bind ( null , undefined ) ) ;
27+ } ) . then ( done , done ) ;
2128} ) ;
You can’t perform that action at this time.
0 commit comments