vojtajina/testacular — pull request #33 by avalanche123 (2012-08-19 20:26:05+00:00)
Title: add ability to fail beforeEach/afterEach hooks

Mocha emits 'hook' and 'hook end' to signal 'before*' and 'after*' hook processing. However 'fail' is emitted when either type is throwing an error. This would cause testacular to not be able to report hook errors and $errors for hooks is undefined. This fixes it by making behavior of hooks and tests the same when it comes to error reporting