mochajs/mocha — pull request #1409 by dasilvacontin (2014-10-31 23:11:44+00:00)
Title: fix missing hooks after failed test with bail

Issue #1093.

Line ```247``` in ```lib/runner.js``` (which was causing the bug) is pointless:

* If a test fails and the suite has bail, no more tests will be executed due to line ```419```. After finishing the hooks for the current failed test and since no more tests will be executed, no more hooks will be executed in the suite.

* Independently of having bail or not, if ```beforeAll``` fails, the suite will be ended due to line ```521```.

* If ```beforeEach``` fails, runner will proceed with ```afterEach``` due to ```447```. If the suite has bail, no more tests will be ran due to line ```419``` and the suite will end.

* If ```afterEach``` fails and the suit has bail, the suite will end due to line ```419```.

All tests pass after removing the line.

I've also added a test that checks that ```afterEach``` and ```afterAll``` hooks are called after a failed test if the suite has bail. I wasn't sure where to add the test, though. Is it good there? Suggestions?