Skip to content

Commit 7864743

Browse files
committed
Simplify tests using execSync
Now that we are on node 5 or later
1 parent f1da69e commit 7864743

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

tests/uninstall.test.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
require('chai').should();
2-
var exec = require('child_process').exec;
2+
var execSync = require('child_process').execSync;
33
var gitHooks = require('../lib/git-hooks');
44
var fsHelpers = require('../lib/fs-helpers');
55

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

1111
describe('--uninstall', function () {
12-
beforeEach(function (done) {
12+
beforeEach(function () {
1313
fsHelpers.makeDir(SANDBOX_PATH);
14-
exec('git init', {cwd: SANDBOX_PATH}, function (err) {
15-
if (err) {
16-
throw err;
17-
}
18-
done();
19-
});
14+
execSync('git init', {cwd: SANDBOX_PATH});
2015
});
2116

2217
afterEach(function () {

0 commit comments

Comments
 (0)