testee can't handle failure during mocha test hook
- Dominant language
- JavaScript
- Stars
- 119
- Forks
- 23
- PR merge metrics
- No merged PRs in 30d
Description
The Mocha reporter (and likely other test frameworks that have similar concepts) can't handle failures that occur during the running of a test hook. For example an exception in a `beforeEach` handler that will be run before each test in a suite.
The Mocha test framework will stop running when such a failure occurs and emit a `fail` event that is sent to the Testee backend. The backend throws an error since this is a failure outside of a running test and it assumes all failures are test failures. This error isn't handled and prevents testing from ending, Testee continues running indefinitely waiting for testing to proceed.
Additionally, hook failures should be reported by the Testee reporter but since they aren't handled they are also missing from the test output.
Contributor guide
Assessment
This issue has not been assessed yet.