Skip to content
Browse files

Fix issues with fetching the fixture data

  • Loading branch information...
1 parent 622e5d9 commit 63e3b1f8fced28d7a15a0f588ef3ae1127bd1daa @tbranyen tbranyen committed Jul 4, 2014
Showing with 10 additions and 3 deletions.
  1. +10 −3 test/runner.js
View
13 test/runner.js
@@ -1,11 +1,18 @@
var promisify = require("promisify-node");
var fs = promisify("fs");
-var exec = promisify("child_process").exec;
+
+// Have to wrap exec, since it has a weird callback signature.
+var exec = promisify(function(command, callback) {
+ return require("child_process").exec(command, callback);
+});
before(function(done) {
+ this.timeout(5000);
+
var url = "https://github.com/nodegit/nodegit";
+ var done = done.bind(null, null);
- fs.exists("test/repos").then(null, function() {
+ fs.exists("test/repos").then(function() {
return fs.mkdir("test/repos").then(function() {
return exec("git init test/repos/empty");
}).then(function() {
@@ -17,5 +24,5 @@ before(function(done) {
return fs.writeFile(nonrepo + "/file.txt", "This is a bogus file");
});
})
- }).then(done.bind(null, undefined), done.bind(null, undefined));
+ }).then(done, done);
});

0 comments on commit 63e3b1f

Please sign in to comment.
Something went wrong with that request. Please try again.