File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 11var promisify = require ( "promisify-node" ) ;
2- var fs = promisify ( "fs" ) ;
2+ var fse = promisify ( "fs-extra " ) ;
33
44// Have to wrap exec, since it has a weird callback signature.
55var exec = promisify ( function ( command , opts , callback ) {
@@ -16,7 +16,9 @@ before(function(done) {
1616 return exec ( "git init test/repos/empty" ) ;
1717 }
1818
19- fs . mkdir ( "test/repos" ) . then ( initEmpty , initEmpty )
19+ fse . removeSync ( "test/repos" )
20+
21+ fse . mkdir ( "test/repos" ) . then ( initEmpty , initEmpty )
2022 . then ( function ( ) {
2123 return exec ( "git clone " + url + " test/repos/workdir" ) ;
2224 } ) . then ( function ( ) {
@@ -27,9 +29,9 @@ before(function(done) {
2729 var nonrepo = "test/repos/nonrepo" ;
2830
2931 function writeBogus ( ) {
30- return fs . writeFile ( nonrepo + "/file.txt" , "This is a bogus file" ) ;
32+ return fse . writeFile ( nonrepo + "/file.txt" , "This is a bogus file" ) ;
3133 }
3234
33- return fs . mkdir ( nonrepo ) . then ( writeBogus , writeBogus ) ;
35+ return fse . mkdir ( nonrepo ) . then ( writeBogus , writeBogus ) ;
3436 } ) . then ( done , done ) ;
3537} ) ;
You can’t perform that action at this time.
0 commit comments