Skip to content

Commit 3706b2a

Browse files
committed
fix test runner weirdness
1 parent bc8d30b commit 3706b2a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/runner.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
var 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.
55
var 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
});

0 commit comments

Comments
 (0)