bitovi / bitovi/testee

testee can't handle failure during mocha test hook

Open
#162 0 comments 0 reactions 0 assignees View on GitHub
bug fixed in branch review
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.