Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(re-)enable after each hooks to fail tests.
In version 1.2.1, support was added to fail test in the after each hook: > * Added `this.test.error(err)` support to after each hooks. Closes mochajs#287 While migrating from teaspoon-mocha to karma-mocha, we discovered that in the current mocha version this isn't supported anymore (or we don't understand how). In teaspoon this behaviour seems to be patched (running it with the exact same mocha.js 2.2.4 file, teaspoon and karma have different behaviour), although I couldn't quickly pinpoint the code that does that. This patch adds this behaviour back to the code base, but also seems to break certain behaviour (3 tests are failing with this pull request). But I don't understand what those test failures exactly mean. Also I found it quite difficult to add test coverage of this behaviour. Since there aren't any tests calling `runTests`. Help in figuring out what we've done wrong or how we could fix this pull request, would be appreciated. Not supporting this behaviour anymore due to added complexity in the code, would also be fine, but adding some documentation about dropping this functionality would be nice.
- Loading branch information