| 1 |
'use strict'; |
| 2 |
|
| 3 |
describe('spec 1', function () { |
| 4 |
afterEach(function (done) { |
| 5 |
console.log('after'); |
| 6 |
process.nextTick(function () { |
| 7 |
throw new Error('after each hook error'); |
| 8 |
}); |
| 9 |
}); |
| 10 |
it('should be called because error is in after each hook', function () { |
| 11 |
console.log('test 1'); |
| 12 |
}); |
| 13 |
it('should not be called', function () { |
| 14 |
console.log('test 2'); |
| 15 |
}); |
| 16 |
}); |
| 17 |
describe('spec 2', function () { |
| 18 |
it('should be called, because hook error was in a sibling suite', function () { |
| 19 |
console.log('test 3'); |
| 20 |
}); |
| 21 |
}); |