Skip to content

Better error handling in Mocha

Choose a tag to compare

@bmomberger-bitovi bmomberger-bitovi released this 07 Jun 21:37
· 13 commits to master since this release

When hooks fail in Mocha, regular failure messages are sent back to the testee runner, but currently the testee reporting server only understands failure on individual tests, not hooks run outside of them.

With this release, if a before/beforeEach/afterEach/after hook fails, the most contextually relevant test is updated with the hook failure on the reporter side.

In addition, a failure on the server side to accept a patch to a nonexistent test was causing an infinite loop of promise rejections in Chrome. This has also been fixed.