Skip to content

Commit 63e3b1f

Browse files
committed
Fix issues with fetching the fixture data
1 parent 622e5d9 commit 63e3b1f

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

test/runner.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
var promisify = require("promisify-node");
22
var 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

59
before(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
});

0 commit comments

Comments
 (0)