Skip to content

Commit

Permalink
explicitly order setup steps for submodule tests
Browse files Browse the repository at this point in the history
  • Loading branch information
TomNeyland committed Sep 18, 2016
1 parent 08adbe9 commit 7a15018
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,21 @@ describe('git-scripts', function() {
beforeEach(function(done) {
var self = this;
mktmpdir(function(err, dir) {
exec('git init', {cwd: dir});
exec('mv .git .git2', {cwd: dir});
exec('echo "gitdir: ./.git2" > .git', {cwd: dir}, function(){
function setupProj() {
exec('git init', {cwd: dir}, moveGitDir);
}
function moveGitDir() {
exec('mv .git .git2', {cwd: dir}, createGitFile);
}
function createGitFile() {
exec('echo "gitdir: ./.git2" > .git', {cwd: dir}, updateProj);
}
function updateProj() {
self.proj = scripts(dir);
done(err);
});
}

setupProj();
});
});

Expand Down

0 comments on commit 7a15018

Please sign in to comment.