Skip to content

Commit

Permalink
Fix tests for node 0.10 which has no execSync
Browse files Browse the repository at this point in the history
  • Loading branch information
rjmunro committed May 1, 2018
1 parent 6a1945e commit 2597d0e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions tests/uninstall.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require('chai').should();
var execSync = require('child_process').execSync;
var exec = require('child_process').exec;
var gitHooks = require('../lib/git-hooks');
var fsHelpers = require('../lib/fs-helpers');

Expand All @@ -9,9 +9,14 @@ var GIT_HOOKS = GIT_ROOT + 'hooks';
var GIT_HOOKS_OLD = GIT_ROOT + 'hooks.old';

describe('--uninstall', function () {
beforeEach(function () {
beforeEach(function (done) {
fsHelpers.makeDir(SANDBOX_PATH);
execSync('git init', {cwd: SANDBOX_PATH});
exec('git init', {cwd: SANDBOX_PATH}, function (err) {
if (err) {
throw err;
}
done();
});
});

afterEach(function () {
Expand Down

0 comments on commit 2597d0e

Please sign in to comment.