Skip to content

Commit e065583

Browse files
mmillerickdanielstjules
authored andcommitted
Fix #36 - fix root hooks
1 parent b55a165 commit e065583

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/parallel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ function _parallel(name, fn, key) {
127127
if (!specs.length) return;
128128

129129
parentHooks = getParentHooks(parentContext);
130-
disableEachHooks(parentContext);
131130

132131
specs.forEach(function(spec) {
133132
if (spec.skip) {
@@ -144,6 +143,7 @@ function _parallel(name, fn, key) {
144143
});
145144

146145
before(function() {
146+
disableEachHooks(parentContext);
147147
// Before hook exceptions are handled by mocha
148148
return hooks.before().then(function() {
149149
restoreUncaught = patchUncaught();

spec/fixtures/rootHooks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,6 @@ parallel('second suite', function() {
7171
});
7272

7373
it('test', function() {
74-
i++;
74+
assert.equal(i, 10)
7575
});
7676
});

0 commit comments

Comments
 (0)